|
|
@ -91,81 +91,82 @@ public class ScreenCollServiceImpl implements ScreenCollService { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO) { |
|
|
|
public Result insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenPartyLinkMassesDataDao.deletePartyLinkMassesData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); |
|
|
|
screenPartyLinkMassesDataDao.deletePartyLinkMassesData(customerId, orgIds); |
|
|
|
|
|
|
|
screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO); |
|
|
|
screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO) { |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenPartyBranchDataDao.deletePartyBranchData(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenPartyBranchDataDao.deletePartyBranchData(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
formDTO.get(NumConstant.ZERO).getMonthId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO); |
|
|
|
screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertOrgRankData(List<OrgRankDataFormDTO> formDTO) { |
|
|
|
public Result insertOrgRankData(List<OrgRankDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenOrgRankDataDao.deleteOrgRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenOrgRankDataDao.deleteOrgRankData(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
formDTO.get(NumConstant.ZERO).getMonthId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenOrgRankDataDao.batchInsertOrgRankData(formDTO); |
|
|
|
screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertGovernRankData(List<GovernRankDataFormDTO> formDTO) { |
|
|
|
public Result insertGovernRankData(List<GovernRankDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenGovernRankDataDao.deleteGovernRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenGovernRankDataDao.deleteGovernRankData(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
formDTO.get(NumConstant.ZERO).getMonthId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenGovernRankDataDao.batchInsertGovernRankData(formDTO); |
|
|
|
screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertEventData(List<EventDataFormDTO> formDTO) { |
|
|
|
public Result insertEventData(List<EventDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
screenEventDataDao.deleteEventData(formDTO.get(i)); |
|
|
|
screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); |
|
|
|
} |
|
|
|
|
|
|
|
screenEventDataDao.batchInsertEventData(formDTO); |
|
|
|
screenEventDataDao.batchInsertEventData(formDTO, customerId); |
|
|
|
|
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++) { |
|
|
|
if (null != formDTO.get(i).getImgDataList() && formDTO.get(i).getImgDataList().size() > NumConstant.ZERO) { |
|
|
@ -187,157 +188,156 @@ public class ScreenCollServiceImpl implements ScreenCollService { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertDifficultyData(List<DifficultyDataFormDTO> formDTO) { |
|
|
|
public Result insertDifficultyData(List<DifficultyDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
screenDifficultyDataDao.deleteDifficultyData(formDTO.get(i)); |
|
|
|
screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); |
|
|
|
} |
|
|
|
|
|
|
|
screenDifficultyDataDao.batchInsertDifficultyData(formDTO); |
|
|
|
screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO) { |
|
|
|
public Result insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenCpcBaseDataDao.deleteCpcBaseData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); |
|
|
|
screenCpcBaseDataDao.deleteCpcBaseData(customerId, orgIds); |
|
|
|
|
|
|
|
screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO); |
|
|
|
screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertIndexDataMonthly(List<IndexDataMonthlyFormDTO> formDTO) { |
|
|
|
public Result insertIndexDataMonthly(List<IndexDataMonthlyFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenIndexDataMonthlyDao.deleteIndexDataMonthly(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
formDTO.get(NumConstant.ZERO).getMonthId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO); |
|
|
|
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result insertIndexDataYearly(List<IndexDataYearlyFormDTO> formDTO) { |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertIndexDataYearly(List<IndexDataYearlyFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenIndexDataYearlyDao.deleteIndexDataYearly(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO); |
|
|
|
screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertCustomerDept(List<CustomerDeptFormDTO> formDTO) { |
|
|
|
public Result insertCustomerDept(List<CustomerDeptFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] deptIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
deptIds[i] = formDTO.get(i).getDeptId(); |
|
|
|
} |
|
|
|
screenCustomerDeptDao.deleteCustomerDept(formDTO.get(NumConstant.ZERO).getCustomerId(), deptIds); |
|
|
|
screenCustomerDeptDao.deleteCustomerDept(customerId, deptIds); |
|
|
|
|
|
|
|
screenCustomerDeptDao.batchInsertCustomerDept(formDTO); |
|
|
|
screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertCustomerGrid(List<CustomerGridFormDTO> formDTO) { |
|
|
|
public Result insertCustomerGrid(List<CustomerGridFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] gridIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
gridIds[i] = formDTO.get(i).getGridId(); |
|
|
|
} |
|
|
|
screenCustomerGridDao.deleteCustomerGrid(formDTO.get(NumConstant.ZERO).getCustomerId(), gridIds); |
|
|
|
screenCustomerGridDao.deleteCustomerGrid(customerId, gridIds); |
|
|
|
|
|
|
|
screenCustomerGridDao.batchInsertCustomerGrid(formDTO); |
|
|
|
screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO) { |
|
|
|
public Result insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] agencyIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
agencyIds[i] = formDTO.get(i).getAgencyId(); |
|
|
|
} |
|
|
|
screenCustomerAgencyDao.deleteCustomerAgency(formDTO.get(NumConstant.ZERO).getCustomerId(), agencyIds); |
|
|
|
screenCustomerAgencyDao.deleteCustomerAgency(customerId, agencyIds); |
|
|
|
|
|
|
|
screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO); |
|
|
|
screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertUserTotalData(List<UserTotalDataFormDTO> formDTO) { |
|
|
|
public Result insertUserTotalData(List<UserTotalDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenUserTotalDataDao.deleteUserTotalData(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
orgIds); |
|
|
|
screenUserTotalDataDao.deleteUserTotalData(customerId, orgIds); |
|
|
|
|
|
|
|
screenUserTotalDataDao.batchInsertUserTotalData(formDTO); |
|
|
|
screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertUserJoin(List<UserJoinFormDTO> formDTO) { |
|
|
|
public Result insertUserJoin(List<UserJoinFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenUserJoinDao.deleteUserJoin(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
screenUserJoinDao.deleteUserJoin(customerId, |
|
|
|
formDTO.get(NumConstant.ZERO).getYearId(), |
|
|
|
formDTO.get(NumConstant.ZERO).getMonthId(), |
|
|
|
orgIds); |
|
|
|
|
|
|
|
screenUserJoinDao.batchInsertUserJoin(formDTO); |
|
|
|
screenUserJoinDao.batchInsertUserJoin(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result insertPioneerData(List<PioneerDataFormDTO> formDTO) { |
|
|
|
public Result insertPioneerData(List<PioneerDataFormDTO> formDTO, String customerId) { |
|
|
|
if (null != formDTO && formDTO.size() > NumConstant.ZERO){ |
|
|
|
String[] orgIds = new String[formDTO.size()]; |
|
|
|
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ |
|
|
|
orgIds[i] = formDTO.get(i).getOrgId(); |
|
|
|
} |
|
|
|
screenPioneerDataDao.deletePioneerData(formDTO.get(NumConstant.ZERO).getCustomerId(), |
|
|
|
orgIds); |
|
|
|
screenPioneerDataDao.deletePioneerData(customerId, orgIds); |
|
|
|
|
|
|
|
screenPioneerDataDao.batchInsertPioneerData(formDTO); |
|
|
|
screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|