Commit 676cb3dc authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/developer' into developer

parents 98c9b51f 0460f9e5
......@@ -7,4 +7,6 @@ import lombok.Data;
public class PeasantHouseholdPageDto extends Page<PeasantHouseholdPageDto> {
private String nhUserId;
private String peasantHouseholdNo;
private String regionalCompaniesName;
private String developerName;
}
......@@ -21,7 +21,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@Param("ownersName")String ownersName,
@Param("ids")String ids
);
List<PeasantHousehold> selectPeasantHouseholdListsg(@Param("developerId") Long developerId,
List<PeasantHousehold> selectPeasantHouseholdListsg(@Param("unitInfoCode") String unitInfoCode,
@Param("regionalCompaniesSeq")Long regionalCompaniesSeq,
@Param("peasantHouseholdNo")String peasantHouseholdNo,
@Param("ownersName")String ownersName,
......
......@@ -32,7 +32,7 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
FROM hygf_peasant_household
where
hygf_peasant_household.construction_state='备货完成'
and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.developer_id like concat('%',#{developerId},'%')
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.sequence_nbr not in (
select hygf_work_order_power_station.peasant_household_id from hygf_work_order_power_station
......
......@@ -46,11 +46,12 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
hygf_peasant_household.owners_name as ownersName,
hygf_peasant_household.regional_companies_name as regionalCompaniesName,
hygf_peasant_household.regional_companies_seq as regionalCompaniesSeq,
hygf_peasant_household.regional_companies_code ,
hygf_peasant_household.developer_code,
hygf_peasant_household.developer_name as developerName,
hygf_peasant_household.developer_id as developeId,
hygf_peasant_household.sequence_nbr as sequenceNbr,
concat_ws('/',hygf_peasant_household.project_address_name,hygf_peasant_household.project_address_detail) as address,
hygf_peasant_household.project_address_name as sequenceNbr,
hygf_peasant_household.preparation_money_state preparationMoneyState,
hygf_document_station.preparation_money_id as preparationMoneyId,
(select instance_id from hygf_preparation_money_auditing where hygf_document_station.preparation_money_id = hygf_preparation_money_auditing.preparation_money_id limit 1) as instanceId from
......@@ -76,9 +77,8 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
<if test=" preparationMoneyState == 1 ">
and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not null and preparation_money_state != ''
</if>
</where>
GROUP BY hygf_peasant_household.sequence_nbr
order by hygf_peasant_household.sequence_nbr DESC
</select>
</mapper>
......@@ -341,6 +341,9 @@ public class PreparationMoneyController extends BaseController {
public ResponseModel<PreparationMoney> getFromInfo(
@RequestParam(value = "ids") String ids){
List<String> list = Arrays.asList(ids.split(","));
return ResponseHelper.buildResponse(preparationMoneyServiceImpl.getFromInfo(list)) ;
AgencyUserModel userInfo = getUserInfo();
PreparationMoney fromInfo = preparationMoneyServiceImpl.getFromInfo(list);
fromInfo.setOrderUser(userInfo.getRealName());
return ResponseHelper.buildResponse(fromInfo) ;
}
}
......@@ -904,7 +904,7 @@ public ResponseModel< List<Map<String,Object>> > getRegionalCompanieByuser(
) {
UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
return ResponseHelper.buildResponse(unitInfoServiceImpl.selectPeasantHouseholdListsg( userUnitInformationDto.getAmosDealerId(),regionalCompaniesSeq, current,size,peasantHouseholdNo,ownersName, ids));
return ResponseHelper.buildResponse(unitInfoServiceImpl.selectPeasantHouseholdListsg( userUnitInformationDto.getAmosDealerOrgCode(),regionalCompaniesSeq, current,size,peasantHouseholdNo,ownersName, ids));
}
}
......@@ -282,6 +282,10 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
map.put("isFlag", params.get("isFlag"));
if (params.get("isFlag").equals("1")) {
params.put("comments", "退回整改");
params.put("approvalStatus",params.getOrDefault("problemDescription",""));
}else {
params.put("approvalStatus","");
}
} else {
task.setResultCode("approvalStatus");
......@@ -299,7 +303,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
if (null == financingAuditingDto.getInstanceId()) {
financingAuditingDto.setInstanceId(financingAuditing.getInstanceId());
}
financingAuditingDto.setStatus(params.get("approvalStatus").toString());
financingAuditingDto.setStatus(params.getOrDefault("comments", "").toString());
financingAuditingDto.setNodeRouting(FinancingAuditEnum.getNodeByCode(workflowResultDto.getNextNodeKey()));
financingAuditingService.createWithModel(financingAuditingDto);
......
......@@ -912,6 +912,8 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
QueryWrapper<PeasantHousehold> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("amos_user_id", peasantHouseholdPageDto.getNhUserId());
queryWrapper.like(StrUtil.isNotEmpty(peasantHouseholdPageDto.getPeasantHouseholdNo()),"peasant_household_no", "%"+peasantHouseholdPageDto.getPeasantHouseholdNo()+"%");
queryWrapper.like(StrUtil.isNotEmpty(peasantHouseholdPageDto.getRegionalCompaniesName()),"regional_companies_name", "%"+peasantHouseholdPageDto.getRegionalCompaniesName()+"%");
queryWrapper.like(StrUtil.isNotEmpty(peasantHouseholdPageDto.getDeveloperName()),"developer_name", "%"+peasantHouseholdPageDto.getDeveloperName()+"%");
queryWrapper.orderByDesc("rec_date");
return this.baseMapper.selectPage(new Page<>(peasantHouseholdPageDto.getCurrent(),peasantHouseholdPageDto.getSize()),queryWrapper);
}
......
......@@ -1071,11 +1071,19 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//补货审核
public void replenishmentAudit(Long sequenceNbr,Map<String, Object> kv) {
PreparationMoney preparationMoney = preparationMoneyMapper.selectById(sequenceNbr);
LambdaQueryWrapper<DocumentStation> stations = new LambdaQueryWrapper<>();
stations.eq(DocumentStation::getPreparationMoneyId,sequenceNbr);
List<DocumentStation> documentStations = documentStationMapper.selectList(stations);
List<Long> collect = documentStations.stream().map(DocumentStation::getStationId).collect(Collectors.toList());
LambdaUpdateWrapper<PeasantHousehold> up = new LambdaUpdateWrapper<>();
if (kv.get("approvalStatus").toString().equals("0")){
preparationMoney.setOrderStatus(DeliveryStateeEnum.待补货.getName());
up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.待补货.getName());
up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.待补货.getName());
up.in(BaseEntity::getSequenceNbr,collect);
peasantHouseholdMapper.update(null,up);
}else {
preparationMoney.setOrderStatus(DeliveryStateeEnum.待确认.getName());
}
......@@ -1136,8 +1144,8 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
listDocumentStation.add(documentStation);
}
up.in(PeasantHousehold::getSequenceNbr, idsH);
up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.待补.getName());
up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.待补.getName());
up.set(PeasantHousehold::getPreparationMoneyState, ArrivalStateeEnum.待收.getName());
up.set(PeasantHousehold::getConstructionState, ArrivalStateeEnum.待收.getName());
peasantHouseholdMapper.update(null, up);
documentStationService.saveBatch(listDocumentStation);
}
......@@ -1197,6 +1205,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
stations.add(documentStation);
});
preparationMoney.setPeasantHouseholdId(stations);
preparationMoney.setOrderTime(new Date());
return preparationMoney;
}
}
\ No newline at end of file
......@@ -1054,7 +1054,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
pagenew.setRecords(page.getList());
return pagenew;
}
public Page<PeasantHousehold> selectPeasantHouseholdListsg( Long unitInfoId,
public Page<PeasantHousehold> selectPeasantHouseholdListsg( String unitInfoCode,
Long regionalCompaniesSeq,
int pageNum,
int pageSize,
......@@ -1062,7 +1062,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
String ownersName,
String ids){
PageHelper.startPage(pageNum, pageSize);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdListsg(unitInfoId,regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdListsg(unitInfoCode,regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids);
PageInfo<PeasantHousehold> page = new PageInfo(list);
Page<PeasantHousehold> pagenew = new Page<PeasantHousehold>();
pagenew.setCurrent(pageNum);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment