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;
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;
}
......@@ -10,6 +10,7 @@ import lombok.Value;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
*
......@@ -20,7 +21,7 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_replenishment")
@TableName(value="hygf_replenishment",autoResultMap = true)
public class HygfReplenishment extends BaseEntity {
private static final long serialVersionUID = 1L;
......@@ -41,6 +42,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
*/
@TableField(value = "file" , typeHandler = FastjsonTypeHandler.class)
private String file;
private List<Map> file;
}
......@@ -151,7 +151,8 @@ public class PreparationMoney extends BaseEntity {
private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水
@TableField(exist = false)
private List<HygfReplenishmentDto> files; //发货单流水
private List<HygfReplenishment> files;
@TableField(exist = false)
private String instanceId; //发货单流水
......
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
......
......@@ -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}
</if>
<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 test="dto.deliveryTimeStart != null and dto.deliveryTimeEnd != ''">
and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd}
......
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();
......
......@@ -818,7 +818,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return true;
} catch (Exception e) {
throw new BadRequest("删除失败!");
throw new BadRequest("删除失败!" + e.getMessage());
}
}
......
......@@ -126,7 +126,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
if (!workorderPeasant.isEmpty()) {
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
}
@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