2026.1.19
1. 新增可配置的台账提交期限
2. 新增可配置的自巡查承诺
| | |
| | | val lastHour = LocalDateTime.ofInstant(sDate.toInstant(), ZoneId.systemDefault()).minusHours(12) |
| | | sDate = Date.from(lastHour.atZone(ZoneId.systemDefault()).toInstant()) |
| | | } |
| | | // sDate = Date.from(LocalDateTime.of(2023, 8, 1, 0, 0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()) |
| | | sDate = Date.from(LocalDateTime.of(2025, 11, 4, 0, 0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()) |
| | | // eDate = Date.from(LocalDateTime.of(2023, 8, 23, 0, 0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()) |
| | | var page = 1 |
| | | var hasNextPage: Boolean = false |
| | |
| | | |
| | | const val TAG = "JinAnLianTongHttpService" |
| | | private const val TOKEN = "e6dc8bb9e1ff0ce973fb92b4af2e4c3f" |
| | | private val httpMethod: HttpMethod = HttpMethod("101.230.224.77", 8088, true) |
| | | // private val httpMethod: HttpMethod = HttpMethod("101.230.224.77", 8088, true) |
| | | private val httpMethod: HttpMethod = HttpMethod("fmepi.jingan.gov.cn", 8088, true) |
| | | |
| | | open class RequestData( |
| | | val current: Int = 1, |
| | |
| | | package cn.flightfeather.supervision.domain.repository |
| | | |
| | | import cn.flightfeather.supervision.common.exception.BizException |
| | | import cn.flightfeather.supervision.domain.entity.BaseInfo |
| | | import cn.flightfeather.supervision.domain.entity.UserConfig |
| | | import cn.flightfeather.supervision.domain.entity.UserSetting |
| | | import cn.flightfeather.supervision.domain.entity.Userinfo |
| | | import cn.flightfeather.supervision.domain.mapper.BaseInfoMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserConfigMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserSettingMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserinfoMapper |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | |
| | | private val userConfigMapper: UserConfigMapper, |
| | | private val userinfoMapper: UserinfoMapper, |
| | | private val baseInfoMapper: BaseInfoMapper, |
| | | private val userSettingMapper: UserSettingMapper, |
| | | ) { |
| | | |
| | | fun select(configId: Int): UserConfig? { |
| | |
| | | return userConfigMapper.selectByPrimaryKey(configId) |
| | | } |
| | | |
| | | fun getUserSetting(userId: String): UserSetting? { |
| | | val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: throw BizException("该用户不存在") |
| | | val baseInfo = baseInfoMapper.selectByPrimaryKey(userId) |
| | | val userSetting = UserSetting().apply { |
| | | userTypeId = userInfo.usertypeid?.toInt() |
| | | provinceName = baseInfo?.biProvinceName |
| | | cityName = baseInfo?.biCityName |
| | | districtName = baseInfo?.biDistrictName ?: userInfo.extension1 |
| | | sceneTypeId = userInfo.extension2?.toInt() |
| | | } |
| | | val res = userSettingMapper.select(userSetting) |
| | | |
| | | return if (res.isNotEmpty()) res[0] else null |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.flightfeather.supervision.domain.entity.CommitmentTemplate |
| | | import cn.flightfeather.supervision.domain.entity.UserConfig |
| | | import cn.flightfeather.supervision.domain.entity.UserSetting |
| | | import cn.flightfeather.supervision.domain.entity.UserSettingRecord |
| | | import cn.flightfeather.supervision.lightshare.vo.UserSearchCondition |
| | | |
| | | interface ConfigService { |
| | |
| | | |
| | | fun getUserConfig(userId: String): UserConfig? |
| | | |
| | | fun getUserSetting(userId: String): UserSetting? |
| | | |
| | | fun getUserSettingRecord(userId: String): UserSettingRecord? |
| | | |
| | | } |
| | |
| | | package cn.flightfeather.supervision.lightshare.service.Impl |
| | | |
| | | import cn.flightfeather.supervision.common.exception.BizException |
| | | import cn.flightfeather.supervision.domain.entity.CommitmentTemplate |
| | | import cn.flightfeather.supervision.domain.entity.SceneType |
| | | import cn.flightfeather.supervision.domain.entity.UserConfig |
| | | import cn.flightfeather.supervision.domain.entity.* |
| | | import cn.flightfeather.supervision.domain.mapper.* |
| | | import cn.flightfeather.supervision.domain.repository.UserConfigRep |
| | | import cn.flightfeather.supervision.lightshare.service.ConfigService |
| | |
| | | private val baseInfoMapper: BaseInfoMapper, |
| | | private val commitmentTemplateMapper: CommitmentTemplateMapper, |
| | | private val sceneTypeMapper: SceneTypeMapper, |
| | | private val userConfigRep: UserConfigRep |
| | | private val userConfigRep: UserConfigRep, |
| | | private val userSettingRecordMapper: UserSettingRecordMapper, |
| | | ) : ConfigService { |
| | | |
| | | override fun getSceneRange(userId: String): List<Pair<String?, String?>>? { |
| | |
| | | override fun getUserConfig(userId: String): UserConfig? { |
| | | return userConfigRep.getUserConfigBySubType(userId) |
| | | } |
| | | |
| | | override fun getUserSetting(userId: String): UserSetting? { |
| | | return userConfigRep.getUserSetting(userId) |
| | | } |
| | | |
| | | override fun getUserSettingRecord(userId: String): UserSettingRecord? { |
| | | return userSettingRecordMapper.selectByPrimaryKey(userId) |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 自寻查承诺 |
| | | * 承诺完成后,在一个自然年内记录都有效,也可以覆盖上传 |
| | | */ |
| | | override fun promiseSelfPatrol(record: UserSettingRecord): UserSettingRecord? { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
| | |
| | | val districtName = condition.districtName ?: user?.extension1 |
| | | |
| | | val p = PageHelper.startPage<Userinfo>(page, perPage) |
| | | val result = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | val userInfoList = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | if (condition.searchText?.isNotBlank() == true) { |
| | | and(createCriteria() |
| | | .orLike("acountname", "%${condition.searchText}%") |
| | |
| | | .andEqualTo("isenable", true).apply { |
| | | condition.userTypeId?.let { andEqualTo("usertypeid", it) } |
| | | }) |
| | | //todo 2020.8.19 街镇的条件查询需要扩充BaseInfo数据表字段后再实现 |
| | | }) |
| | | //2025.11.28 通过BaseInfo表中的biTownCode字段来筛选出符合条件的用户 |
| | | val baseInfoList = baseInfoMapper.selectByExample(Example(BaseInfo::class.java).apply { |
| | | createCriteria().andIn("biGuid", userInfoList.map { it?.guid }) |
| | | }).filter { it.biTownCode == condition.townCode } |
| | | |
| | | val result = userInfoList.filter { u-> baseInfoList.any { b-> b.biGuid == u?.guid } } |
| | | |
| | | response.setIntHeader("totalPage", p.pages) |
| | | response.setIntHeader("currentPage", p.pageNum) |
| | |
| | | package cn.flightfeather.supervision.lightshare.service |
| | | |
| | | import cn.flightfeather.supervision.domain.entity.SelfPatrolTask |
| | | import cn.flightfeather.supervision.domain.entity.UserSettingRecord |
| | | import cn.flightfeather.supervision.lightshare.vo.BaseResponse |
| | | import cn.flightfeather.supervision.lightshare.vo.LedgerSubTypeVo |
| | | import cn.flightfeather.supervision.lightshare.vo.LedgerVo |
| | |
| | | * @param justFinishedNum 内存中刚完成的任务数(考虑刚执行任务记录的插入语句还未真正入库的情况) |
| | | */ |
| | | fun checkSelfPatrolFinished(taskId: String?, justFinishedNum: Int) |
| | | |
| | | fun promiseSelfPatrol(record: UserSettingRecord): UserSettingRecord? |
| | | } |
| | |
| | | fun getUserConfig( |
| | | @ApiParam("用户id") @RequestParam("userId") userId: String, |
| | | ) = resPack { configService.getUserConfig(userId) } |
| | | |
| | | @ApiOperation(value = "获取用户相关业务属性配置信息") |
| | | @GetMapping("/user/setting") |
| | | fun getUserSetting( |
| | | @ApiParam("用户id") @RequestParam("userId") userId: String, |
| | | ) = resPack { configService.getUserSetting(userId) } |
| | | |
| | | @ApiOperation(value = "获取用户相关业务属性配置记录信息") |
| | | @GetMapping("/user/setting/record") |
| | | fun getUserSettingRecord( |
| | | @ApiParam("用户id") @RequestParam("userId") userId: String, |
| | | ) = resPack { configService.getUserSettingRecord(userId) } |
| | | } |
| | |
| | | import cn.flightfeather.supervision.domain.entity.Company |
| | | import cn.flightfeather.supervision.domain.entity.PersonalInfo |
| | | import cn.flightfeather.supervision.domain.entity.SelfPatrolTask |
| | | import cn.flightfeather.supervision.domain.entity.UserSettingRecord |
| | | import cn.flightfeather.supervision.lightshare.service.AuthService |
| | | import cn.flightfeather.supervision.lightshare.service.SelfPatrolService |
| | | import cn.flightfeather.supervision.lightshare.vo.AuthSceneVo |
| | |
| | | fun getDetailList( |
| | | @ApiParam(value = "自寻查任务id") @RequestParam taskId: String, |
| | | ) = selfPatrolService.getDetailList(taskId) |
| | | |
| | | @ApiOperation("自巡查承诺") |
| | | @PostMapping("/promise") |
| | | fun promiseSelfPatrol( |
| | | @RequestBody record: UserSettingRecord, |
| | | ) = resPack { selfPatrolService.promiseSelfPatrol(record) } |
| | | |
| | | |
| | | } |
| | |
| | | @Async |
| | | @Scheduled(cron = "0 0 * * * *") |
| | | fun eachHour() { |
| | | if (mode != "pro") return |
| | | |
| | | logger.info("=====>>>>>每小时任务执行 {}", System.currentTimeMillis()) |
| | | taskJinAnHourlyDustData.doTask(LocalDateTime.now()) |
| | | logger.info("=====>>>>>每小时任务结束 {}", System.currentTimeMillis()) |
| | |
| | | // @Async |
| | | // @Scheduled(cron = "0 0 0 * * *") |
| | | fun eachDay() { |
| | | if (mode != "pro") return |
| | | logger.info("=====>>>>>每日任务执行 {}", System.currentTimeMillis()) |
| | | |
| | | logger.info("=====>>>>>每日任务结束 {}", System.currentTimeMillis()) |
| | |
| | | @Async |
| | | @Scheduled(cron = "0 0 0 * * SUN") |
| | | fun eachSunday() { |
| | | if (mode != "pro") return |
| | | logger.info("=====>>>>>每周日零点任务执行 {}", System.currentTimeMillis()) |
| | | mTaskJinAnHourlyDustData.handle() |
| | | logger.info("=====>>>>>每周日零点任务结束 {}", System.currentTimeMillis()) |
| | |
| | | @Async |
| | | @Scheduled(cron = "0 0 3 1 * *") |
| | | fun eachMonth() { |
| | | if (mode != "pro") return |
| | | logger.info("=====>>>>>每月初任务执行 {}", System.currentTimeMillis()) |
| | | // 执行上个月的静安工地扬尘数据补全任务 |
| | | val now = LocalDate.now().minusMonths(1) |
| | |
| | | #imgPath: C:/02product/05ledger/images/ |
| | | #filePath: C:/02product/05ledger/files/ |
| | | |
| | | #针对微信小程序和安卓app两种前端,目前有部分区别,pro:表示小程序 |
| | | mode: pro |
| | |
| | | imgPath: D:/02product/05ledger/images/ |
| | | filePath: D:/02product/05ledger/files/ |
| | | |
| | | #针对微信小程序和安卓app两种前端,目前有部分区别,true:表示app,false:表示小程序 |
| | | #systemIsApp: true |
| | | #针对微信小程序和安卓app两种前端,目前有部分区别,proapp:表示app |
| | | mode: proapp |
| | |
| | | <!-- enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false" />--> |
| | | <table tableName="ea_t_scene_type" domainObjectName="SceneType" |
| | | enableCountByExample="false" |
| | | enableUpdateByExample="false" enableDeleteByExample="false" |
| | | enableSelectByExample="false" selectByExampleQueryId="false" /> |
| | | <!-- <table tableName="ea_t_scene_type" domainObjectName="SceneType"--> |
| | | <!-- enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false" />--> |
| | | <!-- <table tableName="ja_t_dust_site_map" domainObjectName="DustSiteMap"--> |
| | | <!-- enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | |
| | | <!-- enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false" />--> |
| | | <!-- <table tableName="sm_t_setting" domainObjectName="UserSetting"--> |
| | | <!-- enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false" />--> |
| | | <table tableName="sm_t_setting_record" domainObjectName="UserSettingRecord" |
| | | enableCountByExample="false" |
| | | enableUpdateByExample="false" enableDeleteByExample="false" |
| | | enableSelectByExample="false" selectByExampleQueryId="false" /> |
| | | </context> |
| | | </generatorConfiguration> |