批量更新状态

zhangtao
dongdingding 1 year ago
parent d4344978c3
commit 82bd5630ad

@ -50,75 +50,7 @@ public class EnterpristQuartz {
@GetMapping("/getList") @GetMapping("/getList")
@ApiOperation(value = "定时任务") @ApiOperation(value = "定时任务")
public AjaxResult updateInformationData() { public AjaxResult updateInformationData() {
// 查询szs_enterprise_informa tion表中的数据
// List<SzsEnterpriseInformation> enterpriseInformationList = szsEnterpriseInformationMapper.selectSzsEnterpriseInformationList(null);
// // 遍历数据并更新到b_enterprise_new表中
// List<String> szsList = new ArrayList<>();
// for (SzsEnterpriseInformation enterpriseInformation : enterpriseInformationList) {
// BEnterpriseNew enterpriseNew = new BEnterpriseNew();
// enterpriseNew.setEnterpriseId(enterpriseInformation.getUuitNo());
// enterpriseNew.setEnterpriseName(enterpriseInformation.getEnterpriseName());
// enterpriseNew.setDistrict(enterpriseInformation.getSubdistrict());
// enterpriseNew.setSupervisionLarge(enterpriseInformation.getSupervisionLarge());
// // 根据enterpriseId判断数据是否已存在
// QueryWrapper<BEnterpriseNew> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("enterprise_id", enterpriseInformation.getUuitNo());
// //获取enterpriseName
// szsList.add(enterpriseNew.getEnterpriseName());
// Long count = bEnterpriseNewMapper.selectCount(queryWrapper);
// if (count > 0) {
// // 更新数据
// bEnterpriseNewMapper.updateBEnterpriseNew(enterpriseNew);
// } else {
// // 插入数据
// bEnterpriseNewMapper.insertBEnterpriseNew(enterpriseNew);
// }
// }
// // 查询b_enterprise_new表中的所有企业名称
// List<BEnterpriseNew> enterpriseList = bEnterpriseNewMapper.selectBEnterpriseNewList(null);
// // 查询b_standardization表中的所有企业名称
// List<BStandardization> standardizationList = bStandardizationMapper.selectBStandardizationList(null);
// //更新b_enterprise_new表中匹配的企业的STAND_LEVEL字段
// for (BEnterpriseNew enterprise : enterpriseList) {
// for (BStandardization standardization : standardizationList) {
// if (enterprise.getEnterpriseName().equals(standardization.getEnterpriseName())) {
// // 执行更新操作,例如:
// enterprise.setStandLevel(standardization.getStandardizedGrade());
// bEnterpriseNewMapper.updateBEnterpriseNew(enterprise);
// } else {
// enterprise.setStandLevel("/");
// bEnterpriseNewMapper.updateBEnterpriseNew(enterprise);
// }
// }
// }
// // 找出在b_standardization表中存在但在b_enterprise_new表中不存在的企业名称
// List<BStandardization> notInEnterpriseNew = new ArrayList<>();
// for (BStandardization standardization : standardizationList) {
// boolean found = false;
// for (BEnterpriseNew enterprise : enterpriseList) {
// if (enterprise.getEnterpriseName().equals(standardization.getEnterpriseName())) {
// found = true;
// break;
// }
// }
// if (!found) {
// BStandardization b = new BStandardization();
// b.setStandardizedGrade(standardization.getStandardizedGrade());
// b.setEnterpriseName(standardization.getEnterpriseName());
// notInEnterpriseNew.add(b);
// }
// }
// // 查询b_enterprise_new表中的所有企业名称 更新检查时间
// for (BEnterpriseNew a : enterpriseList) {
// BEnterpriseNew bEnterpriseNew = new BEnterpriseNew();
// List<SzEnforExamine> szEnforExamineList = szEnforExamineService.getByEnterPriseCode(a.getEnterpriseId());
// for (SzEnforExamine b:szEnforExamineList) {
// bEnterpriseNew.setId(a.getId());
// bEnterpriseNew.setExamineEndTime(b.getExamineEndTime());
// bEnterpriseNewMapper.updateBEnterpriseNew(bEnterpriseNew);
// }
// }
return AjaxResult.success(null); return AjaxResult.success(null);
} }

@ -331,10 +331,10 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id=#{enterpriseId},</if> <if test="enterpriseId != null">enterprise_id=#{enterpriseId},</if>
<if test="district != null">district=#{district},</if> <if test="district != null">district=#{district},</if>
<if test="plannedYear != null">planned_year={plannedYear},</if> <if test="plannedYear != null">planned_year=#{plannedYear},</if>
<if test="isPoint != null">is_point=#{isPoint},</if> <if test="isPoint != null">is_point=#{isPoint},</if>
<if test="enterpriseName != null">enterprise_name=#{enterpriseName},</if> <if test="enterpriseName != null">enterprise_name=#{enterpriseName},</if>
<if test="lawSort != null">law_sort=#{law_sort},</if> <if test="lawSort != null">law_sort=#{lawSort},</if>
<if test="lawAreas != null">law_areas=#{lawAreas},</if> <if test="lawAreas != null">law_areas=#{lawAreas},</if>
<if test="lawLevel != null">law_level=#{lawLevel},</if> <if test="lawLevel != null">law_level=#{lawLevel},</if>
<if test="lawHierarchy != null">law_hierarchy=#{lawHierarchy},</if> <if test="lawHierarchy != null">law_hierarchy=#{lawHierarchy},</if>

Loading…
Cancel
Save