bug修改

workplace
anthonywj 11 months ago
parent 8abe46cd10
commit 0e0c19f095

@ -128,7 +128,7 @@ public class IoCollectOrderCodeManController extends BaseController {
if (StrUtil.isEmpty(addTagCodeReqeust.getBillNo())) {
String orderNo = gennerOrderUtils.createWdOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd"));
BasicCollectBustypeEntity bustypeEntity = bustypeService.findByCode(workPlace.getOrderId());
IoCollectOrder.builder()
collectOrder = IoCollectOrder.builder()
.billNo(orderNo)
.busType(bustypeEntity.getCode())
.fromType(bustypeEntity.getFromType())

@ -9,7 +9,9 @@ import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.basic.BasicSkPrescribeEntity;
import com.glxp.api.entity.collect.IoCollectOrder;
import com.glxp.api.req.basic.PrescribeBindWorkRequest;
import com.glxp.api.req.collect.CollectOrderBindWorkRequest;
import com.glxp.api.req.collect.CollectOrderBizRequest;
import com.glxp.api.req.collect.CollectOrderRequest;
@ -22,6 +24,7 @@ import com.glxp.api.service.collect.IoCollectOrderBizService;
import com.glxp.api.service.collect.IoCollectOrderService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -155,11 +158,17 @@ public class IoCollectOrderController extends BaseController {
@PostMapping("/udiwms/basic/collect/order/bindWork")
public BaseResponse bindWork(@RequestBody CollectOrderBindWorkRequest bindWorkRequest) {
for (IoCollectOrder collectOrder : bindWorkRequest.getList()) {
if (bindWorkRequest.getCollOrder() != null) {
IoCollectOrder collectOrder = bindWorkRequest.getCollOrder();
collectOrder.setWorkPlaceCode(bindWorkRequest.getWorkplaceCode());
collectOrderService.updateById(collectOrder);
} else {
for (IoCollectOrder collectOrder : bindWorkRequest.getList()) {
collectOrder.setWorkPlaceCode(bindWorkRequest.getWorkplaceCode());
}
collectOrderService.updateBatchById(bindWorkRequest.getList());
}
collectOrderService.updateBatchById(bindWorkRequest.getList());
return ResultVOUtils.success("绑定成功");
}

@ -9,5 +9,6 @@ import java.util.List;
public class CollectOrderBindWorkRequest {
List<IoCollectOrder> list;
IoCollectOrder collOrder;
String workplaceCode;
}

@ -11,10 +11,15 @@ import com.glxp.api.entity.collect.IoCollectOrderBiz;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.req.collect.CollectOrderRequest;
import com.glxp.api.req.inout.FilterOrderRequest;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.res.collect.IoCollectOrderResponse;
import com.glxp.api.res.inout.IoOrderResponse;
import com.glxp.api.service.basic.BasicCollectBustypeService;
import com.glxp.api.service.basic.UdiRelevanceService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderService;
import com.glxp.api.util.IntUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -54,15 +59,19 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
BasicCollectBustypeService collectBustypeService;
@Resource
IoCollectOrderBizService collectOrderBizService;
@Resource
UdiRelevanceService udiRelevanceService;
/**
*
*/
public void importOrder() {
List<IoOrderEntity> list = orderService.selectAll();
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setPage(1);
filterOrderRequest.setLimit(1000);
List<IoOrderResponse> list = orderService.filterList(filterOrderRequest);
List<IoCollectOrder> collectOrderList = new ArrayList<>();
for (IoOrderEntity ioOrderEntity : list) {
for (IoOrderResponse ioOrderEntity : list) {
BasicCollectBustypeEntity collectBustypeEntity = collectBustypeService.findByAddr(ioOrderEntity.getAction());
if (collectBustypeEntity == null)
continue;
@ -73,11 +82,10 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
.billNo(ioOrderEntity.getBillNo())
.busType(collectBustypeEntity.getCode())
.fromType("内部单据")
.fromCorp(ioOrderEntity.getFromCorp())
.fromCorp(ioOrderEntity.getFromName())
.billTime(ioOrderEntity.getCreateTime())
.createTime(ioOrderEntity.getCreateTime())
.createUser(ioOrderEntity.getCreateUser())
.fromCorp(ioOrderEntity.getFromCorp())
.updateTime(new Date())
.splitStatus(0)
.tagStatus(0)
@ -87,8 +95,12 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
List<IoCollectOrderBiz> collectOrderBizs = new ArrayList<>();
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByRelId(bizEntity.getBindRlFk() + "");
IoCollectOrderBiz collectOrderBiz = IoCollectOrderBiz.builder().orderIdFk(collectOrder.getBillNo())
.relId(bizEntity.getBindRlFk())
.thrCode(udiRelevanceResponse.getMainId())
.ybbm(udiRelevanceResponse.getYbbm())
.payFeeCode(udiRelevanceResponse.getPayFeeCode())
.cpmctymc(bizEntity.getCoName())
.nameCode(bizEntity.getNameCode())
.ggxh(bizEntity.getSpec())
@ -99,6 +111,11 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
.measureUnit(bizEntity.getMeasname())
.tagStatus(1)
.unTagCount(bizEntity.getCount()).build();
if (IntUtil.value(udiRelevanceResponse.getProductsType()) == 2) {
collectOrderBiz.setGgxh(udiRelevanceResponse.getBzgg());
collectOrderBiz.setMeasureUnit(udiRelevanceResponse.getPrepnUnit());
}
collectOrderBizs.add(collectOrderBiz);
}
if (CollUtil.isNotEmpty(collectOrderBizs))

@ -5,7 +5,7 @@
resultType="com.glxp.api.res.basic.BasicSkPrescribeResponse">
SELECT basic_sk_prescribe.*, basic_sk_sicker.name sickName, sys_workplace.workplaceName
FROM basic_sk_prescribe
inner join basic_sk_sicker on basic_sk_prescribe.sickerCode = basic_sk_sicker.code
left join basic_sk_sicker on basic_sk_prescribe.sickerCode = basic_sk_sicker.code
left join sys_workplace on basic_sk_prescribe.workPlaceCode = sys_workplace.workplaceId
<where>
<if test="code != '' and code != null">

Loading…
Cancel
Save