Merge remote-tracking branch 'origin/dev' into dev

dev
薛宇 2 years ago
commit 10b15fae56

@ -216,6 +216,7 @@ public class BasicBussinessTypeController extends BaseController {
} else {
result.addAll(bussinessTypeEntities);
}
System.out.println("result:"+result.toArray());
PageInfo<BasicBussinessTypeEntity> pageInfo;
pageInfo = new PageInfo<>(result);

@ -397,7 +397,6 @@ public class IoCodeTempController extends BaseController {
//三期校验
if (bussinessTypeEntity.isCodeFillCheck()) {
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null) {
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(code);
@ -415,7 +414,6 @@ public class IoCodeTempController extends BaseController {
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
}
if (StrUtil.isNotEmpty(orderId)) {
List<IoCodeTempEntity> ioCodeEnttities = codeTempService.findByOrderId(orderId);
IoCodeTempEntity ioCodeEnttity = isExitLocal(code, ioCodeEnttities);
@ -425,6 +423,20 @@ public class IoCodeTempController extends BaseController {
} else
return checkOriginCodeRes;
}
} else {
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null) {
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(code);
if (codeLostEntity != null) {
udiEntity.setBatchNo(codeLostEntity.getBatchNo());
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null)
return checkOriginCodeRes;
} else
return checkOriginCodeRes;
}
}
@ -759,7 +771,6 @@ public class IoCodeTempController extends BaseController {
}
}
BaseResponse baseResponse = checkRelId(codeEnttity, unitFk);
if (bussinessTypeEntity.getCheckCertExpire() == 2 && udiRelevanceResponse.isNeedCert()) {
@ -1181,7 +1192,8 @@ public class IoCodeTempController extends BaseController {
//扫码数量-1
int orderCount = orderDetailCodeEntity.getCount();
orderDetailCodeEntity.setCount(orderCount - count);
orderDetailCodeEntity.setReCount(orderDetailCodeEntity.getCount() * udiCalCountUtil.getActCount(codeTempEntity.getNameCode()));
int reCount = count * udiCalCountUtil.getActCount(codeTempEntity.getNameCode());
orderDetailCodeEntity.setReCount(IntUtil.value(orderDetailCodeEntity.getReCount()) - reCount);
ioOrderDetailCodeService.update(orderDetailCodeEntity);
}
int b = codeTempService.updateById(codeTempEntity);

@ -0,0 +1,89 @@
package com.glxp.api.controller.inv;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.req.inv.ErrorMsgRequest;
import com.glxp.api.req.inv.FilterInvPreProductRequest;
import com.glxp.api.req.inv.FilterInvPreinProductRequest;
import com.glxp.api.req.inv.FilterInvProductRequest;
import com.glxp.api.res.inv.InvPreProductResponse;
import com.glxp.api.res.inv.InvPreinProductResponse;
import com.glxp.api.res.inv.InvProductPageResponse;
import com.glxp.api.res.inv.InvProductResponse;
import com.glxp.api.service.inv.InvPreProductService;
import com.glxp.api.service.inv.InvPreinProductService;
import com.glxp.api.service.inv.InvProductService;
import com.glxp.api.util.FileUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;
/**
*
*/
@RestController
public class VailInvController {
@Resource
private InvProductService invProductService;
@Resource
private InvPreinProductService invPreinProductService;
@Resource
private InvPreProductService invPreProductService;
@Value("${err_path}")
String errPath;
@AuthRuleAnnotation("")
@GetMapping("/spms/inv/product/vail")
public BaseResponse invProductVail(FilterInvProductRequest filterInvProductRequest) {
List<InvProductResponse> list = invProductService.filterListProduct(filterInvProductRequest);
PageInfo<InvProductResponse> pageInfo = new PageInfo<>(list);
InvProductPageResponse<InvProductResponse> pageResponse = new InvProductPageResponse();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
return ResultVOUtils.success(pageResponse);
}
@AuthRuleAnnotation("")
@GetMapping("/spms/inv/pre/product/vail")
public BaseResponse invPreProductVail(FilterInvPreProductRequest filterInvProductRequest) {
List<InvPreProductResponse> list = invPreProductService.filterList(filterInvProductRequest);
PageInfo<InvPreProductResponse> pageInfo = new PageInfo<>(list);
InvProductPageResponse<InvPreProductResponse> pageResponse = new InvProductPageResponse();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
return ResultVOUtils.success(pageResponse);
}
@AuthRuleAnnotation("")
@GetMapping("/spms/inv/preIn/product/vail")
public BaseResponse invPreInProductVail(FilterInvPreinProductRequest filterInvProductRequest) {
List<InvPreinProductResponse> list = invPreinProductService.filterList(filterInvProductRequest);
PageInfo<InvPreinProductResponse> pageInfo = new PageInfo<>(list);
InvProductPageResponse<InvPreinProductResponse> pageResponse = new InvProductPageResponse();
pageResponse.setList(pageInfo.getList());
pageResponse.setTotal(pageInfo.getTotal());
return ResultVOUtils.success(pageResponse);
}
@PostMapping("/spms/inv/vail/errMsg")
public void genErrorLog(@RequestBody ErrorMsgRequest errorMsgRequest) {
try {
FileUtils.writeFile(errPath, "库存校验-", errorMsgRequest.getErrMsg());
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -184,7 +184,6 @@ public class BasicBussinessTypeEntity {
private String supplementOrderType;
/**
*
*/
@ -280,6 +279,21 @@ public class BasicBussinessTypeEntity {
*/
@TableField(value = "checkCopy")
private int checkCopy;
/**
*
*/
@TableField(value = "checkReview")
private int checkReview;
/**
*
*/
@TableField(value = "secCheckReview")
private boolean seccheckReview;
/**
*
*/
@TableField(value = "thrCheckReview")
private boolean thrCheckReview;
/**
*
@ -414,4 +428,6 @@ public class BasicBussinessTypeEntity {
//是否按货位出库 0不按货位出库1:按货位出库
@TableField(value = "spaceOut")
private int spaceOut;
}

@ -160,14 +160,14 @@ public class UdiRelevanceEntity {
@TableField(value = "useExpireTime")
private Integer useExpireTime;
@TableField(value = "dispatch")
private boolean dispatch;
private Boolean dispatch;
@TableField(value = "groupBuy") //是否可配送
private boolean groupBuy;
private Boolean groupBuy;
//是否集采产品
@TableField(value = "isDateBy")
private Integer isDateBy;
@TableField(value = "needCert")
private boolean needCert; //是否需要资质材料
private Boolean needCert; //是否需要资质材料
@TableField(value = "certIdFk")
private String certIdFk;

@ -1,5 +1,6 @@
package com.glxp.api.req.basic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
@Data
@ -38,5 +39,13 @@ public class UdiRelevanceRequest {
private Boolean useMuti; //是否多次使用
private Integer useNum; //最小包装单元可使用次数
private Boolean dispatch;
private Boolean groupBuy;
//是否集采产品
private Integer isDateBy;
private Boolean needCert; //是否需要资质材料
private String certIdFk;
}

@ -22,7 +22,7 @@ public class UdiRelevanceSaveRequest {
private Boolean isLock;
private Integer lockStatus;
private Boolean isAdavence;
private boolean useMuti;
private Boolean useMuti;
private Integer useNum;
private String supName;
private Date createTime;
@ -96,8 +96,8 @@ public class UdiRelevanceSaveRequest {
private Boolean relSubmit;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
private boolean needCert; //是否需要资质材料
private Boolean dispatch; //是否可配送
private Boolean groupBuy; //是否集采产品
private Boolean needCert; //是否需要资质材料
private String certIdFk;
}

@ -0,0 +1,8 @@
package com.glxp.api.req.inv;
import lombok.Data;
@Data
public class ErrorMsgRequest {
String errMsg;
}

@ -46,7 +46,7 @@ public class BasicBussinessTypeResponse {
private Boolean changeEnable;
private Boolean genUnit;
private String defaultUnit;
private int spUse;
private Integer spUse;
private Boolean secCheckEnable;
private int checkUdims;
private int checkPdaEd;
@ -152,7 +152,17 @@ public class BasicBussinessTypeResponse {
private String checkPreInOrders;
private Boolean advancePreIn;
private Integer sortNum;
private int spaceOut;
/**
*
*/
private int checkReview;
/**
*
*/
private boolean seccheckReview;
/**
*
*/
private boolean thrCheckReview;
}

@ -126,6 +126,10 @@ public class IoCheckInoutService {
if (bussinessTypeEntity.getCheckCopy() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (bussinessTypeEntity.getCheckReview() == 0) {
return false;
}
}
return true;
}
@ -196,6 +200,11 @@ public class IoCheckInoutService {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (bussinessTypeEntity.getCheckReview() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
}
checkFirstFinish(orderEntity);
}
@ -218,6 +227,10 @@ public class IoCheckInoutService {
codeLostEntity.setId(IdUtil.getSnowflakeNextId());
codeLostEntity.setNameCode(udiEntity.getUdi());
codeLostEntity.setCode(codeEntity.getCode());
codeLostEntity.setBatchNo(codeEntity.getBatchNo());
codeLostEntity.setProduceDate(codeEntity.getProduceDate());
codeLostEntity.setExpireDate(codeEntity.getExpireDate());
codeLostEntity.setSerialNo(codeEntity.getSerialNo());
}
//校验是否写入缺失表
boolean isTrue = false;
@ -773,6 +786,10 @@ public class IoCheckInoutService {
if (!bussinessTypeEntity.isThrCheckSp()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (!bussinessTypeEntity.isThrCheckReview()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
}
}
} else {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
@ -833,6 +850,10 @@ public class IoCheckInoutService {
if (!bussinessTypeEntity.isSecCheckSp()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (!bussinessTypeEntity.isSeccheckReview()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
}
}
} else {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);

@ -61,7 +61,7 @@ public class IoOrderUtilsService {
Boolean checkUdi = false; //判断是不是有错误
//根据供应商id查询用户id
AuthAdmin authAdmins = authAdminDao.findByCustomerld(platformLinkRespons.getUnitId()).get(0);
AuthAdmin authAdmins = authAdminDao.findByCustomerld(platformLinkRespons.getCustomerId()).get(0);
//单据表生成
String billNO = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd"));

@ -1,6 +1,8 @@
package com.glxp.api.util;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import org.apache.commons.beanutils.PropertyUtilsBean;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
@ -949,4 +951,24 @@ public class FileUtils {
e.printStackTrace();
}
}
public static String writeFile(String filePath, String fileDesc, String content) throws IOException {
filePath = String.format("%s/%s", filePath, DateUtil.getDate());
String fileFullPath = String.format("%s/%s-%s.udi", filePath, fileDesc, IdUtil.fastSimpleUUID());
File file = new File(filePath);
if (!file.exists()) {
file.mkdirs();
}
file = new File(fileFullPath);
while (!file.createNewFile()) {
fileFullPath = String.format("%s/%s/%s-%s.udi", filePath, DateUtil.getDate(), fileDesc, IdUtil.fastSimpleUUID());
file = new File(fileFullPath);
}
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(content);
fileWriter.flush();
fileWriter.close();
return fileFullPath;
}
}

@ -3,7 +3,7 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
hikari:
@ -45,6 +45,7 @@ logging:
file_path: d:/udi/udiwms/udiwmsfile/
back_file_path: d:/share/udisps/back/
err_path: d:/udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -45,6 +45,7 @@ logging:
file_path: /udi/udiwms/udiwmsfile/
back_file_path: /share/udisps/back/
err_path: d:/udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -45,6 +45,7 @@ logging:
file_path: /udi/udiwms/udiwmsfile/
back_file_path: /share/udisps/back/
err_path: /udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -51,6 +51,7 @@ knife4j:
file_path: /udi/udiwms/udiwmsfile/
back_file_path: /share/udisps/back/
err_path: /udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -45,6 +45,7 @@ logging:
file_path: /udi/udiwms/udiwmsfile/
back_file_path: /share/udisps/back/
err_path: /udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -45,6 +45,7 @@ logging:
file_path: /udi/udiwms/udiwmsfile/
back_file_path: /share/udisps/back/
err_path: /udi/udiwms/err/
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs

@ -141,7 +141,7 @@
AND basic_products.nameCode = #{nameCode}
</if>
</where>
LIMIT 1
</select>

@ -136,7 +136,7 @@
AND ic.invoiceEncode = #{invoiceEncode}
</if>
</where>
GROUP BY io.orderIdFk
group by io.id
order by ic.updateTime desc
</select>

@ -441,3 +441,7 @@ CALL Pro_Temp_ColumnWork('io_order', 'outSickInfo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode',
'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkReview', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'secCheckReview', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckReview', 'tinyint', 1);

Loading…
Cancel
Save