Commit ae1a6b9d authored by lilongyang's avatar lilongyang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents 0ec9b81d a438487a
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.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -29,6 +31,6 @@ public class HygfReplenishmentDto extends BaseDto {
private String comment;
@ApiModelProperty(value = "补货文件")
private List<Object> file;
private String file;
}
......@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
*/
@TableField(value = "file" , typeHandler = FastjsonTypeHandler.class)
private String file;
private List<Object> file;
}
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.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* Mapper 接口
*
......@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface HygfReplenishmentMapper extends BaseMapper<HygfReplenishment> {
List<HygfReplenishmentDto> selectData(Long sequenceNbr);
}
package com.yeejoin.amos.boot.module.hygf.api.mapper;
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.dto.PeasantHouseholdDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import org.apache.ibatis.annotations.Param;
......
......@@ -2,4 +2,9 @@
<!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">
<select id="selectData" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto">
select * from hygf_replenishment where preparation_money_id = #{sequenceNbr}
</select>
</mapper>
......@@ -13,7 +13,7 @@
hygf_peasant_household.project_address_detail,
b.stamp_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
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_power_station.peasant_household_id
where hygf_power_station.is_delete=0
......
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.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.dto.PeasantHouseholdDto;
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.dto.*;
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.PeasantHousehold;
......@@ -24,6 +22,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.seata.spring.annotation.GlobalTransactional;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -69,6 +68,7 @@ public class PreparationMoneyController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增发货单", notes = "新增发货单")
@GlobalTransactional
@UserLimits
public ResponseModel<PreparationMoney> save( @RequestParam("isSubmit") String isSubmit, @RequestBody PreparationMoney model) {
AgencyUserModel agencyUserModel= getUserInfo();
model = preparationMoneyServiceImpl.saveOrUpdateObjectNew(model,agencyUserModel, isSubmit);
......@@ -278,7 +278,9 @@ public class PreparationMoneyController extends BaseController {
@ApiOperation(httpMethod = "POST",value = "补货申请", notes = "补货申请")
@GlobalTransactional
public ResponseModel replenishmentSubmit( @RequestBody HygfReplenishment hygfReplenishment) {
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
// hygfReplenishment1.setFile(JSON.toJSONString(hygfReplenishment.getFile()));
hygfReplenishmentService.save(hygfReplenishment);
preparationMoneyServiceImpl.replenishmentSubmit(hygfReplenishment.getPreparationMoneyId());
return CommonResponseNewUtil.success();
......
......@@ -270,7 +270,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
@Transactional
public PowerStationConstructionData addOrUpdate(PowerStationConstructionData powerStationConstructionData) {
public synchronized PowerStationConstructionData addOrUpdate(PowerStationConstructionData powerStationConstructionData) {
// 如果不是提交进行单独保存
if (powerStationConstructionData.isCommitFlow()) {
// if(powerStationConstructionData.getSequenceNbr()!=null){
......@@ -334,8 +334,8 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
// 新增施工信息
// 防止重复添加
LambdaUpdateWrapper<PowerStationConstructionData> psc = new LambdaUpdateWrapper<>();
// psc.eq(PowerStationConstructionData::getWorkOrderPowerStationId,
// powerStationConstructionData.getWorkOrderPowerStationId());
psc.eq(PowerStationConstructionData::getWorkOrderPowerStationId,
powerStationConstructionData.getWorkOrderPowerStationId());
psc.eq(PowerStationConstructionData::getWorkOrderId, powerStationConstructionData.getWorkOrderId());
powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData, psc);
// 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