Commit b20b65c8 authored by hezhuozhi's avatar hezhuozhi

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

parents 8970090b a42afe0a
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* *
...@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto { ...@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto {
private String comment; private String comment;
@ApiModelProperty(value = "补货文件") @ApiModelProperty(value = "补货文件")
private String file; private List<Object> file;
} }
...@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity { ...@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件 * 补货文件
*/ */
@TableField(value = "file" , typeHandler = FastjsonTypeHandler.class) @TableField(value = "file" , typeHandler = FastjsonTypeHandler.class)
private List<Object> file; private String file;
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
...@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity { ...@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity {
private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水 private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水
@TableField(exist = false) @TableField(exist = false)
private List<HygfReplenishmentDto> files; //发货单流水
@TableField(exist = false)
private String instanceId; //发货单流水 private String instanceId; //发货单流水
//订单状态 //订单状态
@TableField("order_status") @TableField("order_status")
......
...@@ -70,7 +70,7 @@ and hygf_document_station.station_id is not null ...@@ -70,7 +70,7 @@ and hygf_document_station.station_id is not null
<if test="developerCode!=null and developerCode !=''"> <if test="developerCode!=null and developerCode !=''">
and developer_code = #{developerCode} and developer_code = #{developerCode}
</if> </if>
ORDER BY rec_date DESC ORDER BY creation_time DESC
</select> </select>
<select id="selectUserIsHouse" resultType="java.util.Map"> <select id="selectUserIsHouse" resultType="java.util.Map">
SELECT SELECT
......
...@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController { ...@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController {
* 勘察信息数据提交 * 勘察信息数据提交
* *
* @return * @return
* @throws Exception
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "勘察信息数据提交", notes = "勘察信息数据提交") @ApiOperation(httpMethod = "POST",value = "勘察信息数据提交", notes = "勘察信息数据提交")
@PostMapping(value = "/surveySubmit") @PostMapping(value = "/surveySubmit")
public ResponseModel<SurveyInfoAllDto> surveySubmit(@RequestBody SurveyInfoAllDto surveyInfoAllDto, public ResponseModel<SurveyInfoAllDto> surveySubmit(@RequestBody SurveyInfoAllDto surveyInfoAllDto,
@RequestParam(value = "operationType") String operationType) { @RequestParam(value = "operationType") String operationType) throws Exception {
SurveyInfoAllDto returnDto = surveyInformationServiceImpl.saveSurveyInfo(surveyInfoAllDto,operationType); SurveyInfoAllDto returnDto = surveyInformationServiceImpl.saveSurveyInfo(surveyInfoAllDto,operationType);
return ResponseHelper.buildResponse(returnDto); return ResponseHelper.buildResponse(returnDto);
} }
......
...@@ -88,6 +88,8 @@ public class SurveyInformationServiceImpl ...@@ -88,6 +88,8 @@ public class SurveyInformationServiceImpl
@Autowired @Autowired
IPowerStationService powerStationService; IPowerStationService powerStationService;
@Autowired @Autowired
PowerStationMapper powerStationMapper;
@Autowired
ToDoTasksMapper toDoTasksMapper; ToDoTasksMapper toDoTasksMapper;
@Autowired @Autowired
UserMessageMapper userMessageMapper; UserMessageMapper userMessageMapper;
...@@ -170,10 +172,19 @@ public class SurveyInformationServiceImpl ...@@ -170,10 +172,19 @@ public class SurveyInformationServiceImpl
PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper() PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper()
.selectOne(peasantHouseholdQueryWrapper); .selectOne(peasantHouseholdQueryWrapper);
PowerStation powerStation = powerStationMapper.selectOne(new LambdaQueryWrapper<PowerStation>()
.eq(PowerStation::getPeasantHouseholdId, peasantHousehold.getSequenceNbr()));
if (ArrivalStateeEnum.勘察中.getCode().equals(peasantHousehold.getConstructionState())) { if (ArrivalStateeEnum.勘察中.getCode().equals(peasantHousehold.getConstructionState())) {
// 驳回后重新提交是勘察中->勘察中导致此逻辑有问题,所以去掉这种情况
if (powerStation != null
&& PowerStationProcessStateEnum.不通过.getName().equals(powerStation.getProcessStatus())) {
} else {
throw new BadRequest("勘察中,请稍后再试!"); throw new BadRequest("勘察中,请稍后再试!");
} }
}
surveyInformation.setReview(0); surveyInformation.setReview(0);
if (OPERATION_TYPE_APPLY.equals(operationType) && null == surveyInformation.getCreatorTime()) { if (OPERATION_TYPE_APPLY.equals(operationType) && null == surveyInformation.getCreatorTime()) {
surveyInformation.setCreatorTime(new Date()); surveyInformation.setCreatorTime(new Date());
...@@ -187,7 +198,7 @@ public class SurveyInformationServiceImpl ...@@ -187,7 +198,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据 // 避免生成多份数据
extendedInformationService.saveOrUpdate(extendedInformation, new LambdaQueryWrapper<ExtendedInformation>() extendedInformationService.saveOrUpdate(extendedInformation, new LambdaQueryWrapper<ExtendedInformation>()
.eq(ExtendedInformation::getSurveyInformationId, surveyInformation.getSequenceNbr())); .eq(ExtendedInformation::getSurveyInformationId, surveyInformation.getSequenceNbr()));
//extendedInformationService.saveOrUpdate(extendedInformation); // extendedInformationService.saveOrUpdate(extendedInformation);
// 更新勘察明细信息 // 更新勘察明细信息
SurveyDetailsDto oldSurveyDetails = surveyInfoAllDto.getSurveyDetails(); SurveyDetailsDto oldSurveyDetails = surveyInfoAllDto.getSurveyDetails();
...@@ -196,7 +207,7 @@ public class SurveyInformationServiceImpl ...@@ -196,7 +207,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据 // 避免生成多份数据
surveyDetailsService.saveOrUpdate(surveyDetails, new LambdaQueryWrapper<SurveyDetails>() surveyDetailsService.saveOrUpdate(surveyDetails, new LambdaQueryWrapper<SurveyDetails>()
.eq(SurveyDetails::getSurveyInformationId, surveyInformation.getSequenceNbr())); .eq(SurveyDetails::getSurveyInformationId, surveyInformation.getSequenceNbr()));
//surveyDetailsService.saveOrUpdate(surveyDetails); // surveyDetailsService.saveOrUpdate(surveyDetails);
// 更新商务信息 // 更新商务信息
CommercialDto oldCommercial = surveyInfoAllDto.getCommercial(); CommercialDto oldCommercial = surveyInfoAllDto.getCommercial();
...@@ -215,11 +226,14 @@ public class SurveyInformationServiceImpl ...@@ -215,11 +226,14 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据 // 避免生成多份数据
commercialService.saveOrUpdate(commercial, new LambdaQueryWrapper<Commercial>() commercialService.saveOrUpdate(commercial, new LambdaQueryWrapper<Commercial>()
.eq(Commercial::getSurveyInformationId, surveyInformation.getSequenceNbr())); .eq(Commercial::getSurveyInformationId, surveyInformation.getSequenceNbr()));
//commercialService.saveOrUpdate(commercial); // commercialService.saveOrUpdate(commercial);
// 勘察后,更新状态 // 勘察后,更新状态
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new QueryWrapper<>(); // QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new
// peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformation.getSequenceNbr()); // QueryWrapper<>();
// PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper() // peasantHouseholdQueryWrapper.eq("survey_information_id",
// surveyInformation.getSequenceNbr());
// PeasantHousehold peasantHousehold =
// peasantHouseholdServiceImpl.getBaseMapper()
// .selectOne(peasantHouseholdQueryWrapper); // .selectOne(peasantHouseholdQueryWrapper);
// 更新资料归档信息 // 更新资料归档信息
...@@ -238,7 +252,7 @@ public class SurveyInformationServiceImpl ...@@ -238,7 +252,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据 // 避免生成多份数据
informationService.saveOrUpdate(information, new LambdaQueryWrapper<Information>() informationService.saveOrUpdate(information, new LambdaQueryWrapper<Information>()
.eq(Information::getSurveyInformationId, surveyInformation.getSequenceNbr())); .eq(Information::getSurveyInformationId, surveyInformation.getSequenceNbr()));
//informationService.saveOrUpdate(information); // informationService.saveOrUpdate(information);
peasantHousehold.setOwnersName(surveyInfoAllDto.getSurveyInformation().getOwnersName()); peasantHousehold.setOwnersName(surveyInfoAllDto.getSurveyInformation().getOwnersName());
peasantHousehold.setTelephone(surveyInfoAllDto.getSurveyInformation().getTelephone()); peasantHousehold.setTelephone(surveyInfoAllDto.getSurveyInformation().getTelephone());
......
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