企业产品信息相关代码

ww
anthonywj 2 years ago
parent c878345af6
commit f8051c6c3d

@ -1,5 +1,6 @@
package com.glxp.api.controller.basic; package com.glxp.api.controller.basic;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -15,6 +16,7 @@ import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.auth.AuthAdminResponse; import com.glxp.api.res.auth.AuthAdminResponse;
import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.BasicUdiRelService; import com.glxp.api.service.basic.BasicUdiRelService;
import lombok.Data; import lombok.Data;
@ -202,16 +204,28 @@ public class UdiSyncController extends BaseController {
List<ProductInfoEntity> productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest); List<ProductInfoEntity> productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest);
return ResultVOUtils.success(productInfoEntityList); return ResultVOUtils.success(productInfoEntityList);
} }
//出入库同步下载 //出入库同步下载
@GetMapping("udidl/udiwms/syncCompany") @GetMapping("udidl/udiwms/syncCompany")
public BaseResponse syncCompany(UdiCompanyRequest udiCompanyRequest) { public BaseResponse syncCompany(UdiCompanyRequest udiCompanyRequest) {
List<UdiCompanyEntity> udiCompanyEntities = udiCompanyService.syncDlCompany(udiCompanyRequest); List<UdiCompanyEntity> udiCompanyEntities = udiCompanyService.syncDlCompany(udiCompanyRequest);
return ResultVOUtils.success(udiCompanyEntities); return ResultVOUtils.success(udiCompanyEntities);
}
/**
* DI
*/
@AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/local/filterByUuid")
public BaseResponse filterLocalByUuid(FilterUdiRelRequest filterUdiRelRequest) {
if (StrUtil.isEmpty(filterUdiRelRequest.getUuid())) {
return ResultVOUtils.error(500, "产品ID主键不能为空");
}
List<ProductInfoEntity> udiInfoEntities = productInfoService.selectByUuid(filterUdiRelRequest.getUuid());
return ResultVOUtils.success(udiInfoEntities);
} }
} }

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
@Data @Data
@ -44,5 +46,11 @@ public class BasicUdiRelEntity implements Serializable {
@TableField(value = "updateUser") @TableField(value = "updateUser")
private String updateUser; private String updateUser;
/**
* 1./2./3.
*/
@TableField(value = "companyType")
private String companyType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

@ -39,6 +39,10 @@ public class BasicUdiRelResponse {
*/ */
private String updateUser; private String updateUser;
private String companyType;
private String companyName;
private String nameCode; private String nameCode;
private String packRatio; private String packRatio;

@ -3,9 +3,56 @@
<mapper namespace="com.glxp.api.dao.basic.BasicUdiRelMapper"> <mapper namespace="com.glxp.api.dao.basic.BasicUdiRelMapper">
<select id="filterList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest" <select id="filterList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.BasicUdiRelResponse"> resultType="com.glxp.api.res.basic.BasicUdiRelResponse">
select * select bur.*,
FROM basic_udi_rel uc.companyName,
inner JOIN productinfo p on basic_udi_rel.uuid = p.uuid nameCode,
packRatio,
packLevel,
bhxjsl,
bhzxxsbzsl,
zxxsbzbhsydysl,
bhxjcpbm,
sjcpbm,
bzcj,
thirdProductNo,
thirdProductName,
addType,
deviceRecordKey,
isUseDy,
cpmctymc,
cplb,
flbm,
ggxh,
qxlb,
tyshxydm,
ylqxzcrbarmc,
zczbhhzbapzbh,
ylqxzcrbarywmc,
sydycpbs,
versionNumber,
diType,
scbssfbhph,
scbssfbhxlh,
scbssfbhscrq,
scbssfbhsxrq,
ybbm,
spmc,
cphhhbh,
cpms,
cpbsbmtxmc,
cplx,
hchzsb,
sfwblztlcp,
cgzmraqxgxx,
sfbjwycxsy,
zdcfsycs,
sfwwjbz,
syqsfxyjxmj,
qtxxdwzlj,
mjfs
FROM basic_udi_rel bur
left JOIN productinfo p on bur.uuid = p.uuid
left join user_company uc on bur.companyIdFk = uc.id
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%') AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
@ -17,10 +64,10 @@
AND nameCode LIKE concat(#{nameCode}, '%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND basic_udi_rel.uuid = #{uuid} AND bur.uuid = #{uuid}
</if> </if>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND basic_udi_rel.id = #{id} AND bur.id = #{id}
</if> </if>
<if test="diType != null"> <if test="diType != null">
AND diType = #{diType} AND diType = #{diType}
@ -30,7 +77,7 @@
</if> </if>
<if test="lastUpdateTime != null and lastUpdateTime != ''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ <![CDATA[
and DATE_FORMAT(basic_udi_rel.updateTime, '%Y-%m-%d %H:%i:%S') >= and DATE_FORMAT(bur.updateTime, '%Y-%m-%d %H:%i:%S') >=
DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]> ]]>
</if> </if>
@ -44,6 +91,6 @@
AND nameCode = #{uniqueNameCode} AND nameCode = #{uniqueNameCode}
</if> </if>
</where> </where>
ORDER BY basic_udi_rel.updateTime DESC ORDER BY bur.updateTime DESC
</select> </select>
</mapper> </mapper>

@ -1,129 +1,5 @@
# 字段新增 表名字段名字段类型修改方式1新增2修改3删除 # 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime', CALL Pro_Temp_ColumnWork('basic_udi_rel', 'companyType', 'tinyint', 1);
'datetime ', 1);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime',
'datetime ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'department', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'warehouseDict', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'userData', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'relCode', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'lowStockNum', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'useExpireTime', 'int', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'dispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'groupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'isDateBy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'needCert', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'certIdFk', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'allowNoSerial', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'actionType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckEnable', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckWebNew', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaUn', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaEd', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckUdims', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPc', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckSp', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckChange', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckBalance', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckCopy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'fillCodeRel', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkVailDate', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'targetBusAction', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busBeforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'beforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'auditStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busAuditStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'auditStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busAuditStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'targetBusAction', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'beforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1);
INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)
VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据');
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicDept', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'orderToInSyncTime', 'int', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'supCert', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'systemConfig', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'printConfig', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'scanChangeConfig', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'busChangeConfig', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicThirdDept', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeLost', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1);
# 修改主键为LONG
CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_products', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('company_product_relevance', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_corp', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_user', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_dept', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1);

Loading…
Cancel
Save