新增物价类别

test
anthonywj 1 year ago
parent d7109caf5a
commit 5085b66a7f

@ -598,9 +598,9 @@ public class IoCodeTempController extends BaseController {
if (IntUtil.value(priceFifo) > 0) {
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
//1.获取当前批次已出库数量
Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(),ConstantType.TYPE_OUT);
Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT);
//2.获取当前批次入库数量
Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(),exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) {
InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo());
if (nextInvProduct != null) {

@ -0,0 +1,46 @@
package com.glxp.api.controller.thrsys;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
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.entity.thrsys.ThrHslbEntity;
import com.glxp.api.req.thrsys.FilterThrHslbRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.thrsys.ThrHslbService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@Slf4j
@RestController
public class ThrHslbController {
@Resource
ThrHslbService thrHslbService;
@AuthRuleAnnotation("")
@GetMapping("/udiwms/thrsys/getHslbs")
public BaseResponse getHslbs(FilterThrHslbRequest filterThrHslbRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<ThrHslbEntity> thrHslbEntities
= thrHslbService.getHslbs(filterThrHslbRequest);
PageInfo<ThrHslbEntity> pageInfo;
pageInfo = new PageInfo<>(thrHslbEntities);
PageSimpleResponse<ThrHslbEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(thrHslbEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -0,0 +1,15 @@
package com.glxp.api.dao.thrsys;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.thrsys.ThrHslbEntity;
import com.glxp.api.req.thrsys.FilterThrHslbRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface ThrHslbMapper extends BaseMapper<ThrHslbEntity> {
List<ThrHslbEntity> getHslbs(FilterThrHslbRequest filterThrHslbRequest);
}

@ -0,0 +1,46 @@
package com.glxp.api.entity.thrsys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "thr_hslb")
public class ThrHslbEntity implements Serializable {
@TableId(value = "id", type = IdType.INPUT)
private Integer id;
@TableField(value = "hslb")
private String hslb;
@TableField(value = "hsmc")
private String hsmc;
@TableField(value = "hsbm")
private String hsbm;
@TableField(value = "remark")
private String remark;
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "createTime")
private Date createTime;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,12 @@
package com.glxp.api.req.thrsys;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
@Data
public class FilterThrHslbRequest extends ListPageRequest {
private String key;
private String code;
}

@ -130,6 +130,8 @@ public class UdiRelevanceResponse {
private Integer bpcrid;
private String hslbName;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;

@ -0,0 +1,34 @@
package com.glxp.api.service.thrsys;
import com.github.pagehelper.PageHelper;
import com.glxp.api.req.thrsys.FilterThrCorpRequest;
import com.glxp.api.req.thrsys.FilterThrHslbRequest;
import com.glxp.api.res.thrsys.ThrCorpsResponse;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.dao.thrsys.ThrHslbMapper;
import com.glxp.api.entity.thrsys.ThrHslbEntity;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class ThrHslbService extends ServiceImpl<ThrHslbMapper, ThrHslbEntity> {
@Resource
ThrHslbMapper thrHslbMapper;
public List<ThrHslbEntity> getHslbs(FilterThrHslbRequest filterThrHslbRequest) {
if (filterThrHslbRequest == null) {
return Collections.emptyList();
}
if (filterThrHslbRequest.getPage() != null) {
int offset = (filterThrHslbRequest.getPage() - 1) * filterThrHslbRequest.getLimit();
PageHelper.offsetPage(offset, filterThrHslbRequest.getLimit());
}
List<ThrHslbEntity> data = thrHslbMapper.getHslbs(filterThrHslbRequest);
return data;
}
}

@ -538,11 +538,13 @@
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
basic_products.categoryName,
th.hsmc hslbName
FROM basic_products
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
left join thr_hslb th on basic_products.basicPrductRemak8 = th.hsbm
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
@ -1711,7 +1713,7 @@
<select id="selectRelIdByName" resultType="java.lang.String">
SELECT b2.id
FROM basic_products b1
LEFT JOIN basic_udirel b2 ON b1.uuid = b2.uuid
LEFT JOIN basic_udirel b2 ON b1.uuid = b2.uuid
<where>
<if test="productName != '' and productName != null">
AND b1.cpmctymc like concat('%', #{productName}, '%')
@ -1723,67 +1725,67 @@
<select id="selectOneUdi" resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
select basic_udirel.*,
basic_products.originUuid,
basic_products.nameCode,
basic_products.deviceRecordKey,
basic_products.packRatio,
basic_products.packUnit,
basic_products.packLevel,
basic_products.bhxjsl,
basic_products.bhzxxsbzsl,
basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,
basic_products.bzcj,
basic_products.cpmctymc,
basic_products.cplb,
basic_products.flbm,
basic_products.ggxh,
basic_products.qxlb,
basic_products.tyshxydm,
basic_products.ylqxzcrbarmc,
basic_products.zczbhhzbapzbh,
basic_products.ylqxzcrbarywmc,
basic_products.sydycpbs,
basic_products.sjcpbm,
basic_products.versionNumber,
basic_products.diType,
basic_products.ybbm,
basic_products.sptm,
basic_products.manufactory,
basic_products.measname,
basic_products.productType,
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,
basic_products.cpms,
basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.allowNoSerial,
basic_products.spmc,
basic_products.cplx,
basic_products.hchzsb,
basic_products.cpdls,
basic_products.basicPrductRemak1,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
basic_products.originUuid,
basic_products.nameCode,
basic_products.deviceRecordKey,
basic_products.packRatio,
basic_products.packUnit,
basic_products.packLevel,
basic_products.bhxjsl,
basic_products.bhzxxsbzsl,
basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,
basic_products.bzcj,
basic_products.cpmctymc,
basic_products.cplb,
basic_products.flbm,
basic_products.ggxh,
basic_products.qxlb,
basic_products.tyshxydm,
basic_products.ylqxzcrbarmc,
basic_products.zczbhhzbapzbh,
basic_products.ylqxzcrbarywmc,
basic_products.sydycpbs,
basic_products.sjcpbm,
basic_products.versionNumber,
basic_products.diType,
basic_products.ybbm,
basic_products.sptm,
basic_products.manufactory,
basic_products.measname,
basic_products.productType,
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,
basic_products.cpms,
basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.allowNoSerial,
basic_products.spmc,
basic_products.cplx,
basic_products.hchzsb,
basic_products.cpdls,
basic_products.basicPrductRemak1,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
FROM basic_udirel
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
<where>
<if test="id != '' and id != null">
AND basic_udirel.id = #{id}

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.thrsys.ThrHslbMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.thrsys.ThrHslbEntity">
<!--@mbg.generated-->
<!--@Table thr_hslb-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="hslb" jdbcType="VARCHAR" property="hslb"/>
<result column="hsmc" jdbcType="VARCHAR" property="hsmc"/>
<result column="hsbm" jdbcType="VARCHAR" property="hsbm"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, hslb, hsmc, hsbm, remark, updateTime, createTime
</sql>
<select id="getHslbs" parameterType="com.glxp.api.req.thrsys.FilterThrHslbRequest"
resultType="com.glxp.api.entity.thrsys.ThrHslbEntity">
SELECT *
FROM thr_hslb
<where>
<if test="key != '' and key != null">
AND (hslb LIKE concat('%', #{key}, '%') or hsmc LIKE concat('%', #{key}, '%') or
hsbm LIKE concat('%', #{key}, '%'))
</if>
<if test="code != '' and code != null">
AND hsbm = #{code}
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save