|
|
@ -17,6 +17,7 @@ import com.dreamchaser.depository_manage.service.DepositoryRecordService; |
|
|
import com.dreamchaser.depository_manage.service.RoleService; |
|
|
import com.dreamchaser.depository_manage.service.RoleService; |
|
|
import com.dreamchaser.depository_manage.service.SplitUnitService; |
|
|
import com.dreamchaser.depository_manage.service.SplitUnitService; |
|
|
import com.dreamchaser.depository_manage.utils.*; |
|
|
import com.dreamchaser.depository_manage.utils.*; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.redisson.api.RLock; |
|
|
import org.redisson.api.RLock; |
|
|
import org.redisson.api.RedissonClient; |
|
|
import org.redisson.api.RedissonClient; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -31,6 +32,7 @@ import java.util.concurrent.*; |
|
|
* @author Dreamchaser |
|
|
* @author Dreamchaser |
|
|
*/ |
|
|
*/ |
|
|
@Service |
|
|
@Service |
|
|
|
|
|
@Slf4j |
|
|
public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private DepositoryRecordMapper depositoryRecordMapper; |
|
|
private DepositoryRecordMapper depositoryRecordMapper; |
|
|
@ -2174,7 +2176,6 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public Integer reviewByQyWxApprovalOut(String mainId, ApprovalInfo_Details approvalInfo_details, String userAgent, String spStatus, String spNo, boolean flagForFirst, int flagForDepository) { |
|
|
public Integer reviewByQyWxApprovalOut(String mainId, ApprovalInfo_Details approvalInfo_details, String userAgent, String spStatus, String spNo, boolean flagForFirst, int flagForDepository) { |
|
|
|
|
|
|
|
|
if (flagForDepository == 3) { |
|
|
if (flagForDepository == 3) { |
|
|
// 如果是仓库管理员审批,直接返回
|
|
|
// 如果是仓库管理员审批,直接返回
|
|
|
return 0; |
|
|
return 0; |
|
|
@ -2198,6 +2199,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
Integer outId = ObjectFormatUtil.toInteger(mainId); |
|
|
Integer outId = ObjectFormatUtil.toInteger(mainId); |
|
|
// 获取对应的出库订单
|
|
|
// 获取对应的出库订单
|
|
|
ApplicationOutRecord recordP = depositoryRecordMapper.findApplicationOutRecordPById(outId); |
|
|
ApplicationOutRecord recordP = depositoryRecordMapper.findApplicationOutRecordPById(outId); |
|
|
|
|
|
|
|
|
// 获取当前出库的仓库是否为开放仓库
|
|
|
// 获取当前出库的仓库是否为开放仓库
|
|
|
int flagForOpenDepository = recordP.getFlagForOpenDepository(); |
|
|
int flagForOpenDepository = recordP.getFlagForOpenDepository(); |
|
|
if (!flagForFirst) { |
|
|
if (!flagForFirst) { |
|
|
@ -2419,7 +2421,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 将当前redis中存储的spno删除
|
|
|
// 将当前redis中存储的spno删除
|
|
|
redisPool.getRedisTemplateByDb(14).delete("wms_QyWxMessage_" + spNo); |
|
|
redisPool.getRedisTemplateByDb(14).delete("wms_QyWxMessage_" + spNo); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} |
|
|
|
|
|
else { |
|
|
// 如果是部门负责人
|
|
|
// 如果是部门负责人
|
|
|
|
|
|
|
|
|
String departmentheadTime = recordP.getDepartmentheadTime(); |
|
|
String departmentheadTime = recordP.getDepartmentheadTime(); |
|
|
@ -2473,6 +2476,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if (flag) { |
|
|
if (flag) { |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
log.info("出库审批参数 “flagForFirst:"+flagForFirst+"”,“flagForDepository:"+flagForDepository+"”,审批人:"+userByPort.getNumber()+userByPort.getName()); |
|
|
map.put("id", outId); |
|
|
map.put("id", outId); |
|
|
return depositoryRecordMapper.updateApplicationOutRecord(map); |
|
|
return depositoryRecordMapper.updateApplicationOutRecord(map); |
|
|
|
|
|
|
|
|
|