Browse Source

根据市里的变动做变动

master
jianjun 3 years ago
parent
commit
f23a21d5a4
  1. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java
  2. 11
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java
  3. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java
  4. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java
  5. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml
  6. 9
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml
  7. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml
  8. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java

@ -21,7 +21,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -135,7 +134,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl<EventreportPi
entity.setLng(item.getLng()); entity.setLng(item.getLng());
entity.setLat(item.getLat()); entity.setLat(item.getLat());
entity.setIsDel("N"); entity.setIsDel("N");
entity.setUpdateTime(new Date()); entity.setUpdateTime(null);
//业务不包含 一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2) //业务不包含 一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2)
if ("03".equals(item.getParentEventCategory())) { if ("03".equals(item.getParentEventCategory())) {

11
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java

@ -32,7 +32,6 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@ -187,7 +186,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
entity.setGridName(ag.getGridName()); entity.setGridName(ag.getGridName());
entity.setGridLevel("07"); entity.setGridLevel("07");
entity.setIsDel("N"); entity.setIsDel("N");
entity.setUpdateTime(new Date()); entity.setUpdateTime(null);
if (ag.getLatitude().length() > 10) { if (ag.getLatitude().length() > 10) {
entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10)));
} else { } else {
@ -256,7 +255,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
if (StringUtils.isNotBlank(formDTO.getOldCode()) && !formDTO.getOldCode().equals(entity.getGridCode())){ if (StringUtils.isNotBlank(formDTO.getOldCode()) && !formDTO.getOldCode().equals(entity.getGridCode())){
GridInfoPingyinEntity gridInfoEntity = new GridInfoPingyinEntity(); GridInfoPingyinEntity gridInfoEntity = new GridInfoPingyinEntity();
gridInfoEntity.setGridCode(entity.getGridCode()); gridInfoEntity.setGridCode(entity.getGridCode());
gridInfoEntity.setUpdateTime(new Date()); gridInfoEntity.setUpdateTime(null);
LambdaUpdateWrapper<GridInfoPingyinEntity> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<GridInfoPingyinEntity> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(GridInfoPingyinEntity::getGridCode,formDTO.getOldCode()); updateWrapper.eq(GridInfoPingyinEntity::getGridCode,formDTO.getOldCode());
int update = baseDao.update(gridInfoEntity, updateWrapper); int update = baseDao.update(gridInfoEntity, updateWrapper);
@ -265,7 +264,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
GridstaffInfoPingyinEntity staffInfo = new GridstaffInfoPingyinEntity(); GridstaffInfoPingyinEntity staffInfo = new GridstaffInfoPingyinEntity();
staffInfo.setGridCode(entity.getGridCode()); staffInfo.setGridCode(entity.getGridCode());
staffInfo.setUpdateTime(new Date()); staffInfo.setUpdateTime(null);
LambdaUpdateWrapper<GridstaffInfoPingyinEntity> staffInfoWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<GridstaffInfoPingyinEntity> staffInfoWrapper = new LambdaUpdateWrapper<>();
staffInfoWrapper.eq(GridstaffInfoPingyinEntity::getGridCode,formDTO.getOldCode()); staffInfoWrapper.eq(GridstaffInfoPingyinEntity::getGridCode,formDTO.getOldCode());
@ -274,7 +273,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
GridstaffWorkInfoPingyinEntity workInfo = new GridstaffWorkInfoPingyinEntity(); GridstaffWorkInfoPingyinEntity workInfo = new GridstaffWorkInfoPingyinEntity();
workInfo.setGridCode(entity.getGridCode()); workInfo.setGridCode(entity.getGridCode());
workInfo.setUpdateTime(new Date()); workInfo.setUpdateTime(null);
LambdaUpdateWrapper<GridstaffWorkInfoPingyinEntity> workInfoWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<GridstaffWorkInfoPingyinEntity> workInfoWrapper = new LambdaUpdateWrapper<>();
workInfoWrapper.eq(GridstaffWorkInfoPingyinEntity::getGridCode,formDTO.getOldCode()); workInfoWrapper.eq(GridstaffWorkInfoPingyinEntity::getGridCode,formDTO.getOldCode());
@ -283,7 +282,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
EventreportPingyinEntity eventEntity = new EventreportPingyinEntity(); EventreportPingyinEntity eventEntity = new EventreportPingyinEntity();
eventEntity.setGridCode(entity.getGridCode()); eventEntity.setGridCode(entity.getGridCode());
eventEntity.setUpdateTime(new Date()); eventEntity.setUpdateTime(null);
LambdaUpdateWrapper<EventreportPingyinEntity> eventWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<EventreportPingyinEntity> eventWrapper = new LambdaUpdateWrapper<>();
eventWrapper.eq(EventreportPingyinEntity::getGridCode,formDTO.getOldCode()); eventWrapper.eq(EventreportPingyinEntity::getGridCode,formDTO.getOldCode());

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java

@ -26,7 +26,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -138,7 +137,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
GridstaffInfoPingyinEntity gs = baseDao.selectByCodeAndStaffId(r.getCode(), r.getStaffId()); GridstaffInfoPingyinEntity gs = baseDao.selectByCodeAndStaffId(r.getCode(), r.getStaffId());
log.info(String.format("网格工作人员信息同步,当前操作人员信息,姓名:%s staffId:%s", entity.getNickName(), entity.getGridUserId())); log.info(String.format("网格工作人员信息同步,当前操作人员信息,姓名:%s staffId:%s", entity.getNickName(), entity.getGridUserId()));
if (null != gs) { if (null != gs) {
entity.setUpdateTime(new Date()); entity.setUpdateTime(null);
baseDao.edit(entity); baseDao.edit(entity);
} else { } else {
insert(entity); insert(entity);

2
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java

@ -135,7 +135,7 @@ public class GridstaffWorkInfoPingyinServiceImpl extends BaseServiceImpl<Gridsta
entity.setWorkResult(NumConstant.ONE == record.getIsNormal() ? "Y" : "N"); entity.setWorkResult(NumConstant.ONE == record.getIsNormal() ? "Y" : "N");
entity.setWorkType(record.getWorkTypeSecondCode()); entity.setWorkType(record.getWorkTypeSecondCode());
entity.setRecoredInsertTime(record.getCreatedTime()); entity.setRecoredInsertTime(record.getCreatedTime());
entity.setUpdateTime(record.getUpdatedTime()); entity.setUpdateTime(null);
entity.setId(null); entity.setId(null);
entity.setIsDel("N"); entity.setIsDel("N");
return entity; return entity;

2
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml

@ -40,7 +40,7 @@
<result property="recoredInsertTime" column="recored_insert_time"/> <result property="recoredInsertTime" column="recored_insert_time"/>
</resultMap> </resultMap>
<delete id="deleteAllData"> <delete id="deleteAllData">
DELETE FROM eventreport_pingyin update eventreport_pingyin SET is_del = 'Y'
</delete> </delete>

9
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml

@ -4,12 +4,12 @@
<mapper namespace="com.epmet.opendata.dao.GridInfoPingyinDao"> <mapper namespace="com.epmet.opendata.dao.GridInfoPingyinDao">
<delete id="deleteAllAgencyData"> <delete id="deleteAllAgencyData">
delete from grid_info_pingyin where grid_level !='07' update grid_info_pingyin set is_del = 'Y' where grid_level !='07'
</delete> </delete>
<delete id="deleteAllGridData"> <delete id="deleteAllGridData">
delete from grid_info_pingyin where grid_level ='07' update grid_info_pingyin set is_del = 'Y' where grid_level ='07'
</delete> </delete>
<select id="selectByGridCode" parameterType="java.lang.String" resultType="com.epmet.opendata.entity.GridInfoPingyinEntity"> <select id="selectByGridCode" parameterType="java.lang.String" resultType="com.epmet.opendata.entity.GridInfoPingyinEntity">
@ -22,13 +22,12 @@
set grid_name = #{gridName}, set grid_name = #{gridName},
grid_level = #{gridLevel}, grid_level = #{gridLevel},
lng = #{lng}, lng = #{lng},
lat = #{lat}, lat = #{lat}
update_time = now()
where grid_code = #{gridCode} and is_del = 'N' where grid_code = #{gridCode} and is_del = 'N'
</update> </update>
<update id="deleteByCode"> <update id="deleteByCode">
update grid_info_pingyin set is_del = 'Y',update_time = now() update grid_info_pingyin set is_del = 'Y'
where grid_code = #{gridCode} where grid_code = #{gridCode}
</update> </update>
</mapper> </mapper>

2
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml

@ -16,7 +16,7 @@
</update> </update>
<delete id="del"> <delete id="del">
delete from gridstaff_info_pingyin UPDATE gridstaff_info_pingyin set IS_LEAVE = 'Y'
</delete> </delete>
<select id="selectByCodeAndStaffId" resultType="com.epmet.opendata.entity.GridstaffInfoPingyinEntity"> <select id="selectByCodeAndStaffId" resultType="com.epmet.opendata.entity.GridstaffInfoPingyinEntity">

2
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml

@ -19,7 +19,7 @@
<result property="recoredInsertTime" column="recored_insert_time"/> <result property="recoredInsertTime" column="recored_insert_time"/>
</resultMap> </resultMap>
<delete id="delAllGridStaffWorkInfoPY"> <delete id="delAllGridStaffWorkInfoPY">
delete from gridstaff_work_info_pingyin LIMIT 1000 update gridstaff_work_info_pingyin SET is_del = 'Y' LIMIT 1000
</delete> </delete>

Loading…
Cancel
Save