Commit 2abdf57a authored by chenzhao's avatar chenzhao

修复bug

parent 60b854e9
...@@ -32,7 +32,7 @@ public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> { ...@@ -32,7 +32,7 @@ public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> {
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"amos_unit_org_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and") @UserEmpower(field ={"regional_companies_code"} ,dealerField={"amos_unit_org_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<Map<String,Object>> preparationStation (@Param(value = "preparationMoneyState") String preparationMoneyState, List<Map<String,Object>> preparationStation (@Param(value = "preparationMoneyState") String preparationMoneyState,
@Param(value = "ownersName") String ownersName, @Param(value = "ownersName") String ownersName,
@Param(value = "regionalcompaniesSeq") String regionalcompaniesSeq, @Param(value = "regionalCompaniesSeq") String regionalCompaniesSeq,
@Param(value = "developerId") String developerId, @Param(value = "developerId") String developerId,
@Param(value = "state") String state); @Param(value = "state") String state);
......
...@@ -13,7 +13,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -13,7 +13,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
</select> </select>
<select id="selectPageList" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney"> <select id="selectPageList" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney">
SELECT hygf_preparation_money.*,(select instance_id from hygf_preparation_money_auditing where preparation_money_id = hygf_preparation_money.sequence_nbr limit 1 ) as instanceId FROM hygf_preparation_money SELECT hygf_preparation_money.*,IFNULL(order_status,arrival_state) as arrivalState,IFNULL(order_status,delivery_state) as deliveryState,(select instance_id from hygf_preparation_money_auditing where preparation_money_id = hygf_preparation_money.sequence_nbr limit 1 ) as instanceId FROM hygf_preparation_money
<where> <where>
<if test="dto.consigneeRegion != null and dto.consigneeRegion != ''"> <if test="dto.consigneeRegion != null and dto.consigneeRegion != ''">
and hygf_preparation_money.consignee_region like concat ('%',#{dto.consigneeRegion},'%') and hygf_preparation_money.consignee_region like concat ('%',#{dto.consigneeRegion},'%')
...@@ -47,7 +47,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -47,7 +47,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
hygf_peasant_household.regional_companies_name as regionalCompaniesName, hygf_peasant_household.regional_companies_name as regionalCompaniesName,
hygf_peasant_household.developer_name as developerName, hygf_peasant_household.developer_name as developerName,
hygf_peasant_household.sequence_nbr as sequenceNbr, hygf_peasant_household.sequence_nbr as sequenceNbr,
concat_ws('/',project_address_name,project_address_detail) as address, 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.project_address_name as sequenceNbr,
hygf_peasant_household.preparation_money_state preparationMoneyState, hygf_peasant_household.preparation_money_state preparationMoneyState,
hygf_document_station.preparation_money_id as preparationMoneyId, hygf_document_station.preparation_money_id as preparationMoneyId,
...@@ -57,7 +57,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -57,7 +57,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
LEFT JOIN hygf_document_station on hygf_peasant_household.sequence_nbr = hygf_document_station.station_id LEFT JOIN hygf_document_station on hygf_peasant_household.sequence_nbr = hygf_document_station.station_id
LEFT JOIN hygf_power_station on hygf_peasant_household.sequence_nbr = hygf_power_station.peasant_household_id LEFT JOIN hygf_power_station on hygf_peasant_household.sequence_nbr = hygf_power_station.peasant_household_id
<where> <where>
<if test="preparationMoneyState!=null and preparationMoneyState !='' and preparationMoneyState == '0' "> <if test=" preparationMoneyState == 0 ">
and hygf_peasant_household.preparation_money_state in ('待发货','待补货','暂存发货') and hygf_peasant_household.preparation_money_state in ('待发货','待补货','暂存发货')
</if> </if>
<if test="regionalCompaniesSeq!=null and regionalCompaniesSeq !='' "> <if test="regionalCompaniesSeq!=null and regionalCompaniesSeq !='' ">
...@@ -72,7 +72,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -72,7 +72,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
<if test="ownersName!=null and ownersName !=''"> <if test="ownersName!=null and ownersName !=''">
and hygf_peasant_household.owners_name like concat ('%',#{ownersName},'%') and hygf_peasant_household.owners_name like concat ('%',#{ownersName},'%')
</if> </if>
<if test="preparationMoneyState!=null and preparationMoneyState !='' and preparationMoneyState == '1' "> <if test=" preparationMoneyState == 1 ">
and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not and preparation_money_state != '' and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not and preparation_money_state != ''
</if> </if>
......
...@@ -19,6 +19,8 @@ import com.yeejoin.amos.feign.privilege.Privilege; ...@@ -19,6 +19,8 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -46,7 +48,7 @@ import java.util.stream.Collectors; ...@@ -46,7 +48,7 @@ import java.util.stream.Collectors;
@Api(tags = "Api") @Api(tags = "Api")
@RequestMapping(value = "/household-contract") @RequestMapping(value = "/household-contract")
public class HouseholdContractController extends BaseController { public class HouseholdContractController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(HouseholdContractController.class);
@Autowired @Autowired
HouseholdContractServiceImpl householdContractServiceImpl; HouseholdContractServiceImpl householdContractServiceImpl;
@Value("${regionalCompanies.company.seq}") @Value("${regionalCompanies.company.seq}")
...@@ -232,9 +234,13 @@ public class HouseholdContractController extends BaseController { ...@@ -232,9 +234,13 @@ public class HouseholdContractController extends BaseController {
ToDoTasks doTasks= toDoTasksMapper.selectOne(wrapper); ToDoTasks doTasks= toDoTasksMapper.selectOne(wrapper);
PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getDataByState(householdContrac.getPeasantHouseholdId()); PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getDataByState(householdContrac.getPeasantHouseholdId());
System.out.println("开始更新农户发货状态"+householdContrac.getPeasantHouseholdId());
if (peasantHousehold != null){ if (peasantHousehold != null){
System.out.println("开始更新农户发货状态"+householdContrac.getPeasantHouseholdId());
peasantHousehold.setPreparationMoneyState(ArrivalStateeEnum.待发货.getCode()); peasantHousehold.setPreparationMoneyState(ArrivalStateeEnum.待发货.getCode());
peasantHouseholdServiceImpl.getBaseMapper().updateById(peasantHousehold); peasantHouseholdServiceImpl.getBaseMapper().updateById(peasantHousehold);
System.out.println("更新成功"+householdContrac.getPeasantHouseholdId());
} }
if(doTasks!=null){ if(doTasks!=null){
......
...@@ -318,7 +318,6 @@ public class PreparationMoneyController extends BaseController { ...@@ -318,7 +318,6 @@ public class PreparationMoneyController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/preparationStation") @GetMapping(value = "/preparationStation")
@ApiOperation(httpMethod = "GET",value = "发货电站", notes = "发货电站") @ApiOperation(httpMethod = "GET",value = "发货电站", notes = "发货电站")
@GlobalTransactional
public ResponseModel<IPage<Map<String,Object>>> preparationStation( public ResponseModel<IPage<Map<String,Object>>> preparationStation(
@RequestParam(value = "current") Integer current, @RequestParam(value = "current") Integer current,
@RequestParam(value = "size") Integer size, @RequestParam(value = "size") Integer size,
......
...@@ -16,6 +16,7 @@ import com.qiyuesuo.sdk.v2.response.SdkResponse; ...@@ -16,6 +16,7 @@ import com.qiyuesuo.sdk.v2.response.SdkResponse;
import com.qiyuesuo.sdk.v2.utils.Algorithm; import com.qiyuesuo.sdk.v2.utils.Algorithm;
import com.qiyuesuo.sdk.v2.utils.Base64Utils; import com.qiyuesuo.sdk.v2.utils.Base64Utils;
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.Enum.ArrivalStateeEnum;
import com.yeejoin.amos.boot.module.hygf.api.Enum.HouseholdContractEnum; import com.yeejoin.amos.boot.module.hygf.api.Enum.HouseholdContractEnum;
import com.yeejoin.amos.boot.module.hygf.api.Enum.TaskTypeStationEnum; import com.yeejoin.amos.boot.module.hygf.api.Enum.TaskTypeStationEnum;
import com.yeejoin.amos.boot.module.hygf.api.dto.CallbackDto; import com.yeejoin.amos.boot.module.hygf.api.dto.CallbackDto;
...@@ -23,6 +24,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractDto; ...@@ -23,6 +24,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.*; import com.yeejoin.amos.boot.module.hygf.api.entity.*;
import com.yeejoin.amos.boot.module.hygf.api.mapper.*; import com.yeejoin.amos.boot.module.hygf.api.mapper.*;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.HouseholdContractServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.HouseholdContractServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.PeasantHouseholdServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -81,6 +83,8 @@ public class QiyuesuoController extends BaseController { ...@@ -81,6 +83,8 @@ public class QiyuesuoController extends BaseController {
private String engineering; private String engineering;
@Autowired @Autowired
ContractFillMapper contractFillMapper; ContractFillMapper contractFillMapper;
@Autowired
PeasantHouseholdServiceImpl peasantHouseholdServiceImpl;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "POST", value = "个人token", notes = "个人token") @ApiOperation(httpMethod = "POST", value = "个人token", notes = "个人token")
...@@ -176,7 +180,7 @@ public class QiyuesuoController extends BaseController { ...@@ -176,7 +180,7 @@ public class QiyuesuoController extends BaseController {
wrapper.set(HouseholdContract::getStampStatus, HouseholdContractEnum.盖章状态_已盖章.getCode()); wrapper.set(HouseholdContract::getStampStatus, HouseholdContractEnum.盖章状态_已盖章.getCode());
wrapper.set(HouseholdContract::getSigningTime, new Date()); wrapper.set(HouseholdContract::getSigningTime, new Date());
wrapper.set(HouseholdContract::getStatus, HouseholdContractEnum.合同状态_双方已签署.getCode()); wrapper.set(HouseholdContract::getStatus, HouseholdContractEnum.合同状态_双方已签署.getCode());
wrapper.set(HouseholdContract::getSealedUser, getUserInfo().getRealName()); // wrapper.set(HouseholdContract::getSealedUser, getUserInfo().getRealName());
wrapper.eq(HouseholdContract::getContractLockId, CallbackDto.getContractId()); wrapper.eq(HouseholdContract::getContractLockId, CallbackDto.getContractId());
householdContractServiceImpl.update(wrapper); householdContractServiceImpl.update(wrapper);
...@@ -184,6 +188,14 @@ public class QiyuesuoController extends BaseController { ...@@ -184,6 +188,14 @@ public class QiyuesuoController extends BaseController {
wrapper4.eq(HouseholdContract::getContractLockId, CallbackDto.getContractId()); wrapper4.eq(HouseholdContract::getContractLockId, CallbackDto.getContractId());
HouseholdContract contract = householdContractMapper.selectOne(wrapper4); HouseholdContract contract = householdContractMapper.selectOne(wrapper4);
PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getDataByState(contract.getPeasantHouseholdId());
logger.info("开始更新农户发货状态"+contract.getPeasantHouseholdId());
if (peasantHousehold != null){
logger.info("开始更新农户发货状态"+contract.getPeasantHouseholdId());
peasantHousehold.setPreparationMoneyState(ArrivalStateeEnum.待发货.getCode());
peasantHouseholdServiceImpl.getBaseMapper().updateById(peasantHousehold);
logger.info("更新成功");
}
LambdaQueryWrapper<ToDoTasks> wrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ToDoTasks> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(ToDoTasks::getType, TaskTypeStationEnum.合同填报.getCode()); wrapper1.eq(ToDoTasks::getType, TaskTypeStationEnum.合同填报.getCode());
......
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