Commit ff23017c authored by yangyang's avatar yangyang

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

parents 91be16d8 20954846
package com.yeejoin.amos.boot.module.hygf.api.dto; package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -29,6 +31,6 @@ public class HygfReplenishmentDto extends BaseDto { ...@@ -29,6 +31,6 @@ public class HygfReplenishmentDto extends BaseDto {
private String comment; private String comment;
@ApiModelProperty(value = "补货文件") @ApiModelProperty(value = "补货文件")
private List<Object> file; private String file;
} }
...@@ -10,6 +10,7 @@ import lombok.Value; ...@@ -10,6 +10,7 @@ import lombok.Value;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
...@@ -20,7 +21,7 @@ import java.util.List; ...@@ -20,7 +21,7 @@ import java.util.List;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("hygf_replenishment") @TableName(value="hygf_replenishment",autoResultMap = true)
public class HygfReplenishment extends BaseEntity { public class HygfReplenishment extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -41,6 +42,6 @@ public class HygfReplenishment extends BaseEntity { ...@@ -41,6 +42,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件 * 补货文件
*/ */
@TableField(value = "file" , typeHandler = FastjsonTypeHandler.class) @TableField(value = "file" , typeHandler = FastjsonTypeHandler.class)
private String file; private List<Map> file;
} }
...@@ -151,7 +151,8 @@ public class PreparationMoney extends BaseEntity { ...@@ -151,7 +151,8 @@ public class PreparationMoney extends BaseEntity {
private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水 private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水
@TableField(exist = false) @TableField(exist = false)
private List<HygfReplenishmentDto> files; //发货单流水 private List<HygfReplenishment> files;
@TableField(exist = false) @TableField(exist = false)
private String instanceId; //发货单流水 private String instanceId; //发货单流水
......
package com.yeejoin.amos.boot.module.hygf.api.mapper; package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment; import com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/** /**
* Mapper 接口 * Mapper 接口
* *
...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface HygfReplenishmentMapper extends BaseMapper<HygfReplenishment> { public interface HygfReplenishmentMapper extends BaseMapper<HygfReplenishment> {
List<HygfReplenishmentDto> selectData(Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.hygf.api.mapper; package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower; import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold; import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
......
...@@ -2,4 +2,9 @@ ...@@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.HygfReplenishmentMapper"> <mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.HygfReplenishmentMapper">
<select id="selectData" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto">
select * from hygf_replenishment where preparation_money_id = #{sequenceNbr}
</select>
</mapper> </mapper>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
hygf_peasant_household.project_address_detail, hygf_peasant_household.project_address_detail,
b.stamp_status, b.stamp_status,
b.status b.status
from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id,stamp_status,status from hygf_household_contract where hygf_household_contract.status !='已作废' from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id,stamp_status,status from hygf_household_contract
) b on b.peasant_household_id=hygf_power_station.peasant_household_id ) b on b.peasant_household_id=hygf_power_station.peasant_household_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_power_station.peasant_household_id LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_power_station.peasant_household_id
where hygf_power_station.is_delete=0 where hygf_power_station.is_delete=0
......
...@@ -31,7 +31,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -31,7 +31,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
and hygf_preparation_money.amos_unit_id = #{dto.amosUnitId} and hygf_preparation_money.amos_unit_id = #{dto.amosUnitId}
</if> </if>
<if test="dto.flag != null and dto.flag != ''"> <if test="dto.flag != null and dto.flag != ''">
and hygf_preparation_money.delivery_state != "已作废" and hygf_preparation_money.delivery_state != "已作废" and hygf_preparation_money.delivery_state != "待发货"
</if> </if>
<if test="dto.deliveryTimeStart != null and dto.deliveryTimeEnd != ''"> <if test="dto.deliveryTimeStart != null and dto.deliveryTimeEnd != ''">
and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd} and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd}
......
package com.yeejoin.amos.boot.module.hygf.biz.controller; package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits; import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto; import com.yeejoin.amos.boot.module.hygf.api.dto.*;
import com.yeejoin.amos.boot.module.hygf.api.dto.PreparationMoneyDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.PreparationPageDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation; import com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment; import com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold; import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
...@@ -24,6 +22,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; ...@@ -24,6 +22,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -69,6 +68,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -69,6 +68,7 @@ public class PreparationMoneyController extends BaseController {
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增发货单", notes = "新增发货单") @ApiOperation(httpMethod = "POST", value = "新增发货单", notes = "新增发货单")
@GlobalTransactional @GlobalTransactional
@UserLimits
public ResponseModel<PreparationMoney> save( @RequestParam("isSubmit") String isSubmit, @RequestBody PreparationMoney model) { public ResponseModel<PreparationMoney> save( @RequestParam("isSubmit") String isSubmit, @RequestBody PreparationMoney model) {
AgencyUserModel agencyUserModel= getUserInfo(); AgencyUserModel agencyUserModel= getUserInfo();
model = preparationMoneyServiceImpl.saveOrUpdateObjectNew(model,agencyUserModel, isSubmit); model = preparationMoneyServiceImpl.saveOrUpdateObjectNew(model,agencyUserModel, isSubmit);
...@@ -278,7 +278,9 @@ public class PreparationMoneyController extends BaseController { ...@@ -278,7 +278,9 @@ public class PreparationMoneyController extends BaseController {
@ApiOperation(httpMethod = "POST",value = "补货申请", notes = "补货申请") @ApiOperation(httpMethod = "POST",value = "补货申请", notes = "补货申请")
@GlobalTransactional @GlobalTransactional
public ResponseModel replenishmentSubmit( @RequestBody HygfReplenishment hygfReplenishment) { public ResponseModel replenishmentSubmit( @RequestBody HygfReplenishment hygfReplenishment) {
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
// hygfReplenishment1.setFile(JSON.toJSONString(hygfReplenishment.getFile()));
hygfReplenishmentService.save(hygfReplenishment); hygfReplenishmentService.save(hygfReplenishment);
preparationMoneyServiceImpl.replenishmentSubmit(hygfReplenishment.getPreparationMoneyId()); preparationMoneyServiceImpl.replenishmentSubmit(hygfReplenishment.getPreparationMoneyId());
return CommonResponseNewUtil.success(); return CommonResponseNewUtil.success();
......
...@@ -818,7 +818,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto ...@@ -818,7 +818,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return true; return true;
} catch (Exception e) { } catch (Exception e) {
throw new BadRequest("删除失败!"); throw new BadRequest("删除失败!" + e.getMessage());
} }
} }
......
...@@ -126,7 +126,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -126,7 +126,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
} }
if (!workorderPeasant.isEmpty()) { if (!workorderPeasant.isEmpty()) {
String names = workorderPeasant.stream().map(i -> i.getOwnersName()).collect(Collectors.joining(",")); String names = workorderPeasant.stream().map(i -> i.getOwnersName()).collect(Collectors.joining(","));
throw new Exception("电站" + names + ",已被工单关联"); throw new Exception("电站" + names + ",已被工单关联,请重新选择电站");
} }
// 保存派工单 // 保存派工单
...@@ -270,7 +270,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -270,7 +270,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
} }
@Transactional @Transactional
public PowerStationConstructionData addOrUpdate(PowerStationConstructionData powerStationConstructionData) { public synchronized PowerStationConstructionData addOrUpdate(PowerStationConstructionData powerStationConstructionData) {
// 如果不是提交进行单独保存 // 如果不是提交进行单独保存
if (powerStationConstructionData.isCommitFlow()) { if (powerStationConstructionData.isCommitFlow()) {
// if(powerStationConstructionData.getSequenceNbr()!=null){ // if(powerStationConstructionData.getSequenceNbr()!=null){
...@@ -334,8 +334,8 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -334,8 +334,8 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
// 新增施工信息 // 新增施工信息
// 防止重复添加 // 防止重复添加
LambdaUpdateWrapper<PowerStationConstructionData> psc = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<PowerStationConstructionData> psc = new LambdaUpdateWrapper<>();
// psc.eq(PowerStationConstructionData::getWorkOrderPowerStationId, psc.eq(PowerStationConstructionData::getWorkOrderPowerStationId,
// powerStationConstructionData.getWorkOrderPowerStationId()); powerStationConstructionData.getWorkOrderPowerStationId());
psc.eq(PowerStationConstructionData::getWorkOrderId, powerStationConstructionData.getWorkOrderId()); psc.eq(PowerStationConstructionData::getWorkOrderId, powerStationConstructionData.getWorkOrderId());
powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData, psc); powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData, psc);
// powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData); // powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData);
......
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