新增物价类别

test
anthonywj 1 year ago
parent 4b99f2841d
commit 871433c022

@ -98,6 +98,7 @@ public class SupManufacturerController {
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse addCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) {
supManufacturerEntity.setCompanyName(StrUtil.trimToEmpty(supManufacturerEntity.getCompanyName()));
String customerId = getCustomerId();
supManufacturerEntity.setCustomerId(customerId);
//判断用户名和社会信用代码不能重复

@ -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);
}
}

@ -292,12 +292,12 @@ public class ThrProductsAddDiController {
/**
* DI
*
* @param uuid
* @param devKey
* @return
*/
@GetMapping("udiwms/thrsys/getDiProductDetail")
public BaseResponse getDiProductDetail(String uuid) {
UdiInfoResponse udiInfoResponse = thrProductsAddDiService.getDiProductDetail(uuid);
public BaseResponse getDiProductDetail(String devKey) {
UdiInfoResponse udiInfoResponse = thrProductsAddDiService.getDiProductDetail(devKey);
return ResultVOUtils.success(udiInfoResponse);
}

@ -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,43 @@
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 lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@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;
}

@ -296,14 +296,19 @@ public class ThrProductsAddDiEntity {
private static final long serialVersionUID = 1L;
@TableField(exist = false)
private String thirdName;
@TableField(exist = false)
private boolean isChecked;
@TableField(exist = false)
private String corpName;
//添加字段
@TableField(exist = false)
private Integer checkStatus;
@TableField(exist = false)
private String thirdSys;
@TableField(exist = false)
private String nameCode;

@ -23,6 +23,7 @@ public class ProductInfoFilterRequest extends ListPageRequest {
private Integer isNewest;
private String zczbhhzbapzbh;
private String updateTime;
private String originUuid;
public String toCacheKey() {
return nameCode + deviceRecordKey + uuid + cpmctymc + ylqxzcrbarmc + ggxh + tyshxydm + diType + zczbhhzbapzbh + updateTime;

@ -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;
}

@ -86,6 +86,7 @@ public class UdiInfoResponse {
private String basicPrductRemak7;
private String basicPrductRemak8;
private String remark;
private String hslbName;
public Integer getId() {
return id;

@ -0,0 +1,32 @@
package com.glxp.api.service.thrsys;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.thrsys.ThrHslbMapper;
import com.glxp.api.entity.thrsys.ThrHslbEntity;
import com.glxp.api.req.thrsys.FilterThrHslbRequest;
import org.springframework.stereotype.Service;
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;
}
}

@ -8,15 +8,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.auth.AuthCompanyMapper;
import com.glxp.api.dao.thrsys.ThrHslbMapper;
import com.glxp.api.dao.thrsys.ThrProductsAddDiDao;
import com.glxp.api.entity.auth.AuthCompany;
import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.thrsys.ThrHslbEntity;
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
import com.glxp.api.req.thrsys.AddThrDiProductsRequest;
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.res.thrsys.ThrProductsAddDiResponse;
import com.glxp.api.res.thrsys.UdiInfoResponse;
import com.glxp.api.service.basic.ProductInfoService;
import com.glxp.api.service.thrsys.ThrHslbService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -138,9 +141,13 @@ public class ThrProductsAddDiService extends ServiceImpl<ThrProductsAddDiDao, Th
}
public UdiInfoResponse getDiProductDetail(String uuid) {
ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiDao.filterThrProductsGetUuid(uuid);
UdiInfoResponse udiInfoResponse = thrProductsAddDiDao.getDiProductDetail(uuid);
@Resource
ThrHslbMapper thrHslbMapper;
public UdiInfoResponse getDiProductDetail(String devKey) {
ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiDao.selectOne(new QueryWrapper<ThrProductsAddDiEntity>().eq("deviceRecordKey", devKey).last("limit 1"));
UdiInfoResponse udiInfoResponse = new UdiInfoResponse();
BeanUtil.copyProperties(thrProductsAddDiEntity, udiInfoResponse);
if (udiInfoResponse != null) {
udiInfoResponse.setSptm(thrProductsAddDiEntity.getSptm());
udiInfoResponse.setYbbm(thrProductsAddDiEntity.getYbbm());
@ -157,6 +164,10 @@ public class ThrProductsAddDiService extends ServiceImpl<ThrProductsAddDiDao, Th
udiInfoResponse.setBasicPrductRemak6(thrProductsAddDiEntity.getBasicPrductRemak6());
udiInfoResponse.setBasicPrductRemak7(thrProductsAddDiEntity.getBasicPrductRemak7());
udiInfoResponse.setBasicPrductRemak8(thrProductsAddDiEntity.getBasicPrductRemak8());
if (StrUtil.isNotEmpty(thrProductsAddDiEntity.getBasicPrductRemak8())) {
ThrHslbEntity thrHslbEntity = thrHslbMapper.selectOne(new QueryWrapper<ThrHslbEntity>().eq("hsbm", thrProductsAddDiEntity.getBasicPrductRemak8()).last("limit 1"));
udiInfoResponse.setHslbName(thrHslbEntity.getHsmc());
}
}
return udiInfoResponse;
}

@ -19,6 +19,9 @@
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="originUuid != '' and originUuid != null">
AND uuid = #{originUuid}
</if>
<if test="deviceRecordKey != '' and deviceRecordKey != null">
AND deviceRecordKey = #{deviceRecordKey}
</if>

@ -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