Merge branch 'dev' into test

pro
wj 2 years ago
commit a3b551a2b0

@ -7,6 +7,7 @@ import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.Constant;
import com.glxp.api.controller.BaseController;
import com.glxp.api.dao.auth.AuthLicenseDao;
import com.glxp.api.dao.auth.InvWarehouseDao;
import com.glxp.api.entity.auth.*;
import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.entity.system.SysPdaKeyEntity;
@ -24,6 +25,7 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.service.auth.*;
import com.glxp.api.util.*;
import com.glxp.api.vo.inv.InvWarehouseTreeVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -308,6 +310,8 @@ public class LoginController extends BaseController {
//------------------------------------------UDIMS接口-----------------------------------------------------------
@Autowired
private InvWarehouseDao invWarehouseDao;
/**
*
*
@ -347,7 +351,7 @@ public class LoginController extends BaseController {
}
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setSpUse(true);
List<InvWarehouseEntity> invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest);
List<InvWarehouseTreeVo> invList = invWarehouseDao.selectInvListTreeByUser(filterInvWarehouseRequest);
Map<String, Object> res = new WeakHashMap<>(2);
res.put("license", authLicense);
res.put("invList", invList);

@ -13,10 +13,7 @@ import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.purchase.SupManufacturerEntity;
import com.glxp.api.entity.purchase.SupProductEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.entity.system.*;
import com.glxp.api.req.basic.FilterOrderPrintRequest;
import com.glxp.api.req.inout.FilterOrderRequest;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
@ -34,8 +31,10 @@ import com.glxp.api.service.system.SystemPDFModuleService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceCodeService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceService;
import com.glxp.api.service.system.SystemPDFTemplateService;
import com.glxp.api.util.FileUtils;
import com.glxp.api.util.JasperUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@ -72,6 +71,8 @@ public class BasicOrderPrintController {
IoCodeService ioCodeService;
@Resource
SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService;
@Value("${file_path}")
private String filePath;
//校验模板是否正确
@AuthRuleAnnotation("")
@ -202,7 +203,7 @@ public class BasicOrderPrintController {
data.put("data", list);
String param = JSON.toJSONString(data);
JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
}
@ -220,4 +221,76 @@ public class BasicOrderPrintController {
return name;
}
//-----------打印码
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/inspection/order/code/file")
public BaseResponse inspectionStockQRCodeTextPDFFromTemplateStatementFile(
@RequestBody FilterOrderPrintRequest filterOrderPrintRequest) throws Exception {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId()+"");
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId());
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/text/inspection/order/code/file")
public BaseResponse stockQRCodeTextPDFFromTemplateStatementFile(
@RequestBody FilterOrderPrintRequest filterOrderPrintRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
List<Object> list = new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId() + "");
if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
//查询单据表
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk());
IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0);
//查询业务单详情
List<IoCodeEntity> ioCodeEntityList = ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
int i = 1;
if (ioCodeEntityList != null && ioCodeEntityList.size() > 0) {
for (IoCodeEntity obj : ioCodeEntityList) {
//查询产品表
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(obj.getNameCode());
//组装数据
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
bizData.put("udiCode", udiProductEntity.getUuid() == null ? ' ' : udiProductEntity.getUuid());
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());
bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh());
bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo());
bizData.put("productDate", obj.getProduceDate());
bizData.put("expireDate", obj.getExpireDate());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
list.add(bizData);
i++;
}
Map<String, Object> data = new HashMap<>();
data.put("data", list);
String param = JSON.toJSONString(data);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
return ResultVOUtils.success();
}
return ResultVOUtils.success();
}
}

@ -186,34 +186,34 @@ public class InvInnerOrderPrintController {
} else {
Map<String, Object> data = new HashMap<String, Object>();
data.put("data", printEntities);
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
}
String orderId="";
String orderId = "";
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {
InvInnerOrderPrintEntity innerOrderPrintEntity = new InvInnerOrderPrintEntity();
innerOrderPrintEntity.setStatus(1);
innerOrderPrintEntity.setId(InnerOrderPrintResponse.getId());
invInnerOrderPrintService.updateOrder(innerOrderPrintEntity);
orderId=InnerOrderPrintResponse.getId()+"";
orderId = InnerOrderPrintResponse.getId() + "";
}
//查询订单id
InvInnerOrderPrintEntity innerOrderPrintEntity=invInnerOrderPrintService.selectById(orderId);
InvInnerOrderPrintEntity innerOrderPrintEntity = invInnerOrderPrintService.selectById(orderId);
//更新内部码状态
InnerOrderEntity innerOrderEntity=innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk());
if(innerOrderEntity!=null){
InnerOrderEntity innerOrderEntity = innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk());
if (innerOrderEntity != null) {
innerOrderEntity.setGenStatus(2);
innerOrderEntity.setId(innerOrderEntity.getId());
innerOrderService.update(innerOrderEntity);
}
IoOrderEntity ioOrderEntity=new IoOrderEntity();
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setInCodeStatus(1);
ioOrderEntity.setBillNo(innerOrderPrintEntity.getOrderIdFk());
ioOrderService.updateByBillNo(ioOrderEntity);
@ -229,7 +229,7 @@ public class InvInnerOrderPrintController {
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId() + "");
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
@ -247,7 +247,7 @@ public class InvInnerOrderPrintController {
@RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId() + "");
if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =
@ -280,7 +280,9 @@ public class InvInnerOrderPrintController {
}
String param = JSON.toJSONString(printEntities);
Map<String,Object> map=new HashMap<>();
map.put("data",printEntities);
String param = JSON.toJSONString(map);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
String orderId = "";

@ -73,10 +73,10 @@ public class SysPdfTemplateController {
SystemPDFTemplateEntity systemPDFTemplateEntity =
systemPDFTemplateService.selectById(String.valueOf(filterPdfTemplateRequest.getId()));
String data = "";
if (systemPDFTemplateEntity.getModule() == 3) {
if (systemPDFTemplateEntity.getModule() == 2 || systemPDFTemplateEntity.getModule() == 3) {
data =
"{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"}]}";
} else if (systemPDFTemplateEntity.getModule() == 2) {
} else if (systemPDFTemplateEntity.getModule() == 0) {
data =
"{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"}]}";
} else if (systemPDFTemplateEntity.getModule() == 1) {

@ -6,6 +6,7 @@ import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.req.auth.FilterInvSubWarehouseRequest;
import com.glxp.api.req.auth.FilterInvWarehouseRequest;
import com.glxp.api.res.auth.InvSubWarehouseResponse;
import com.glxp.api.vo.inv.InvWarehouseTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -92,6 +93,14 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
*/
List<InvWarehouseEntity> selectInvListByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
/**
* ID
*
* @param userId
* @return
*/
List<InvWarehouseTreeVo> selectInvListTreeByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<InvWarehouseEntity> selectInvById(@Param("InvList") List<String> InvList);
/**

@ -85,7 +85,7 @@ public class UdiProductEntity {
private Long relSupId;
private Boolean groupBuy;
private boolean groupBuy;
public Boolean getAllowNoBatch() {

@ -15,5 +15,6 @@ public class FilterOrderPrintRequest {
private String templateId;
private String orderIdFk;
private Integer status;
private Integer labelId;
}

@ -153,6 +153,7 @@ public class IoOrderServiceImpl implements IoOrderService {
orderEntity.setRelKey(UUID.fastUUID().toString(true));
}
orderEntity.setExportStatus(0); //上传状态:未上传
orderEntity.setInCodeStatus(0);
return orderDao.insert(orderEntity);
}

@ -1,5 +1,7 @@
package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -529,6 +531,16 @@ public class FileUtils {
}
}
public static String getLastFileName(String fileName) {
String fileNameNow = fileName.substring(fileName.lastIndexOf("/") + 1);
if (StrUtil.isEmpty(fileNameNow))
return fileName;
else
return fileNameNow;
}
/**
*
*
@ -538,6 +550,7 @@ public class FileUtils {
* @return
* @since 1.0
*/
public static String getSubpath(String pathName, String fileName) {
int index = fileName.indexOf(pathName);
if (index != -1) {

@ -0,0 +1,15 @@
package com.glxp.api.vo.inv;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class InvWarehouseTreeVo extends InvWarehouseEntity {
List<WarehouseBussinessTypeEntity> bussinessTypeList = new ArrayList<>();
}

@ -392,6 +392,38 @@
</where>
GROUP BY auth_warehouse.code
</select>
<resultMap id="selectInvListTreeByUser" type="com.glxp.api.vo.inv.InvWarehouseTreeVo" autoMapping="true">
<collection property="bussinessTypeList" autoMapping="true" ofType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity"
column="code" select="com.glxp.api.dao.auth.WarehouseBussinessTypeDao.selectListByAction"/>
</resultMap>
<select id="selectInvListTreeByUser" resultType="com.glxp.api.vo.inv.InvWarehouseTreeVo">
select auth_warehouse.code,
auth_warehouse.name,
auth_warehouse.parentId,
auth_warehouse.parentCode,
auth_dept.name warehouseName,
auth_warehouse.advanceType
from auth_warehouse
inner join auth_dept on auth_warehouse.parentId = auth_dept.code
LEFT join auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
<where>
<if test="userId != null">
AND auth_warehouse_user.userId = #{userId}
</if>
<if test="pcode != null and pcode != ''">
AND auth_warehouse.parentId = #{pcode}
</if>
<if test="advanceType != null">
AND auth_warehouse.advanceType = #{advanceType}
</if>
<if test="spUse != null">
AND auth_warehouse.spUse = #{spUse}
</if>
</where>
GROUP BY auth_warehouse.code
</select>
<select id="selectParentIdByCode" resultType="java.lang.String">
select parentId

@ -105,7 +105,7 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_products.groupBuy,
-- basic_products.groupBuy,
basic_corp.name companyName
FROM company_product_relevance
inner JOIN basic_udirel

@ -1,391 +1,397 @@
# 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath',
'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 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('sync_data_set', 'udiCodeLost', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order', 'fromReceiveBillNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'fromThrBillNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'syncStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'busType', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'deliveryStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'inCodeStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkTime', 'datetime ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkUser', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'regStatus', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'thirdSysName', 'varchar(255) ', 3);
CALL Pro_Temp_ColumnWork('thr_system_bus_api', 'thirdBuyName', 'varchar(255) ', 3);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'bindRlIds', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'updateUser', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'createUser', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'createTime', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'groupBuy', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'spUse', '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('io_order', 'checkPreInOrders', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'expireDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'batchNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'productDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'expireDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'arrivalCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('pur_arrival', 'supId', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_returned_detail', 'batchNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_returned_detail', 'productDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_returned_detail', 'expireDate', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_delivery', 'supId', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_returned', 'supId', 'varchar(255) ', 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_pre', 'createType', '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);
CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originCount', 'int', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originReCount', 'int', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'mainAction', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'action', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255)', 1);
INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
`paramType`, `paramExplain`)
VALUES (20040, 0, '允许送货单直接入库变更库存', 'deliveryInstock', '0', 1, 0, '01');
CALL Pro_Temp_ColumnWork('sup_product', 'manufactory', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('sup_product', 'allowNoBatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sup_product', 'allowNoExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sup_product', 'allowNoProduct', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sup_product', 'allowNoSerial', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_remind_msg', 'remindCount', 'int', 1);
CALL Pro_Temp_ColumnWork('sup_cert_remind_msg', 'remindCount', 'int', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'orderStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'direct', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sup_manufacturer', 'agentName', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_module', 'modelKey', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessType', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'coldFilePath', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkColdFileName', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkStatus', '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('inv_product', 'nowStock', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'frozenCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'planInCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1);
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', '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('thr_inv_warehouse', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_code', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_biz', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1);
INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)
VALUES (211, 'syncDi', '0 24 3 * * ?', NULL, NULL);
INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)
VALUES (212, 'syncCompany', '0 0 3 * * 1', NULL, NULL);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1);
CREATE TABLE IF NOT EXISTS `inv_prein_product`
(
`id` int NOT NULL AUTO_INCREMENT,
`relIdFk` bigint NULL DEFAULT NULL COMMENT '耗材字典ID',
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识',
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
`inCount` int NULL DEFAULT NULL COMMENT '入库数量',
`outCount` int NULL DEFAULT NULL COMMENT '出库数量',
`reCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量',
`customerId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID',
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID',
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码',
`invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码',
`createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存表'
ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE IF NOT EXISTS `inv_prein_product_detail`
(
`id` int NOT NULL AUTO_INCREMENT,
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'UDI码',
`mainAction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入单据类型',
`action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型',
`orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '订单号外键',
`relId` int NOT NULL COMMENT '耗材字典ID',
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识',
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
`produceDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号',
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商',
`count` int NULL DEFAULT NULL COMMENT '扫码数量',
`reCount` int NULL DEFAULT NULL COMMENT '实际数量',
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码',
`invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编码',
`invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码',
`purchaseType` tinyint NULL DEFAULT NULL COMMENT '采购类型',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存详情表'
ROW_FORMAT = DYNAMIC;
CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes`
(
`id` int NOT NULL AUTO_INCREMENT,
`action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`outChange` tinyint NULL DEFAULT NULL,
`orderStatus` tinyint NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 128
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '单据同步 - 业务单据类型'
ROW_FORMAT = DYNAMIC;
# 修改主键为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('sup_cert', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_cert_set', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_company', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_manufacturer', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_product', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('io_code_lost', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('io_code_rel', '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('thr_bustype_origin', '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_user_bustype', 'userId', '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('thr_dept', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_products', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_corp', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_export_status', 'remark', 'varchar(2048)', 2);
CALL Pro_Temp_ColumnWork('auth_role', 'isCustomer', 'int', 1);
ALTER TABLE `auth_dept_user`
ADD UNIQUE (`userId`, deptId);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'regStatus', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'reviewSp', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncStatus', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncChange', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'price', 'decimal(10, 2)', 1);
# # 字段新增 表名字段名字段类型修改方式1新增2修改3删除
#
#
# CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath',
# 'varchar(255) ', 1);
#
# CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime',
# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
# CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime',
# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
# CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime',
# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1);
# CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime',
# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 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('sync_data_set', 'udiCodeLost', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1);
#
# CALL Pro_Temp_ColumnWork('io_order', 'fromReceiveBillNo', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'fromThrBillNo', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'syncStatus', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'busType', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'deliveryStatus', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'inCodeStatus', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1);
#
# CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'checkTime', 'datetime ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'checkUser', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'regStatus', 'varchar(255) ', 1);
#
#
#
# CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1);
#
# CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'thirdSysName', 'varchar(255) ', 3);
# CALL Pro_Temp_ColumnWork('thr_system_bus_api', 'thirdBuyName', 'varchar(255) ', 3);
#
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'bindRlIds', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1);
#
# CALL Pro_Temp_ColumnWork('thr_products', 'updateUser', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('thr_products', 'createUser', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('thr_products', 'createTime', 'varchar(255) ', 1);
#
# CALL Pro_Temp_ColumnWork('basic_products', 'groupBuy', 'tinyint ', 1);
#
#
#
# CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('auth_warehouse', 'spUse', '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('io_order', 'checkPreInOrders', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1);
#
# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1);
#
#
#
# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'expireDate', 'varchar(255) ', 1);
#
# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'batchNo', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'productDate', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'expireDate', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'arrivalCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('pur_arrival', 'supId', 'varchar(255) ', 1);
#
# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'batchNo', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'productDate', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'expireDate', 'varchar(255) ', 1);
#
#
# CALL Pro_Temp_ColumnWork('pur_delivery', 'supId', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('pur_returned', 'supId', 'varchar(255) ', 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_pre', 'createType', '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);
#
# CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1);
#
# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
# VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1);
# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
# VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1);
# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
# VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1);
#
#
# CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);
#
# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originCount', 'int', 1);
# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originReCount', 'int', 1);
#
# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'mainAction', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'action', 'varchar(255)', 1);
#
# CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255)', 1);
#
# INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
# `paramType`, `paramExplain`)
# VALUES (20040, 0, '允许送货单直接入库变更库存', 'deliveryInstock', '0', 1, 0, '01是');
#
# CALL Pro_Temp_ColumnWork('sup_product', 'manufactory', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoBatch', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoExpire', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoProduct', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoSerial', 'tinyint', 1);
#
# CALL Pro_Temp_ColumnWork('inv_remind_msg', 'remindCount', 'int', 1);
# CALL Pro_Temp_ColumnWork('sup_cert_remind_msg', 'remindCount', 'int', 1);
#
# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'orderStatus', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'direct', 'tinyint', 1);
#
#
# CALL Pro_Temp_ColumnWork('sup_manufacturer', 'agentName', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_module', 'modelKey', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessType', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)', 1);
#
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', 'varchar(255)', 1);
#
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'coldFilePath', 'varchar(255)', 1);
#
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkColdFileName', 'varchar(255)', 1);
#
#
# CALL Pro_Temp_ColumnWork('io_order', 'checkStatus', '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('inv_product', 'nowStock', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product', 'frozenCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product', 'planInCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1);
#
# CALL Pro_Temp_ColumnWork('inv_product_detail', 'inCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_product_detail', 'outCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'inCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'inCount', 'int ', 1);
# CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outCount', 'int ', 1);
#
#
# CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1);
#
# 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', '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('thr_inv_warehouse', 'updateTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_code', 'updateTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_biz', 'updateTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1);
# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1);
#
# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1);
#
#
# INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)
# VALUES (211, 'syncDi', '0 24 3 * * ?', NULL, NULL);
# INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)
# VALUES (212, 'syncCompany', '0 0 3 * * 1', NULL, NULL);
#
#
#
# # CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3);
# # CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1);
#
#
# CREATE TABLE IF NOT EXISTS `inv_prein_product`
# (
# `id` int NOT NULL AUTO_INCREMENT,
# `relIdFk` bigint NULL DEFAULT NULL COMMENT '耗材字典ID',
# `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识',
# `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
# `productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
# `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
# `inCount` int NULL DEFAULT NULL COMMENT '入库数量',
# `outCount` int NULL DEFAULT NULL COMMENT '出库数量',
# `reCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量',
# `customerId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID',
# `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID',
# `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码',
# `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码',
# `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
# `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
# PRIMARY KEY (`id`) USING BTREE
# ) ENGINE = InnoDB
# CHARACTER SET = utf8mb4
# COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存表'
# ROW_FORMAT = DYNAMIC;
#
# SET FOREIGN_KEY_CHECKS = 1;
#
#
#
# CREATE TABLE IF NOT EXISTS `inv_prein_product_detail`
# (
# `id` int NOT NULL AUTO_INCREMENT,
# `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'UDI码',
# `mainAction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入单据类型',
# `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型',
# `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '订单号外键',
# `relId` int NOT NULL COMMENT '耗材字典ID',
# `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识',
# `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
# `produceDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
# `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
# `serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号',
# `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商',
# `count` int NULL DEFAULT NULL COMMENT '扫码数量',
# `reCount` int NULL DEFAULT NULL COMMENT '实际数量',
# `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码',
# `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编码',
# `invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码',
# `purchaseType` tinyint NULL DEFAULT NULL COMMENT '采购类型',
# `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
# PRIMARY KEY (`id`) USING BTREE
# ) ENGINE = InnoDB
# CHARACTER SET = utf8mb4
# COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存详情表'
# ROW_FORMAT = DYNAMIC;
#
#
# CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes`
# (
# `id` int NOT NULL AUTO_INCREMENT,
# `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
# `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
# `outChange` tinyint NULL DEFAULT NULL,
# `orderStatus` tinyint NULL DEFAULT NULL,
# PRIMARY KEY (`id`) USING BTREE
# ) ENGINE = InnoDB
# AUTO_INCREMENT = 128
# CHARACTER SET = utf8mb4
# COLLATE = utf8mb4_0900_ai_ci COMMENT = '单据同步 - 业务单据类型'
# ROW_FORMAT = DYNAMIC;
#
#
# # 修改主键为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('sup_cert', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('sup_company', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('sup_manufacturer', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('sup_product', 'id', 'bigint', 2);
#
#
# CALL Pro_Temp_ColumnWork('io_code_lost', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('io_code_rel', '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('thr_bustype_origin', '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_user_bustype', 'userId', '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('thr_dept', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('thr_products', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('thr_corp', 'id', 'bigint', 2);
#
# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('basic_export_status', 'remark', 'varchar(2048)', 2);
# CALL Pro_Temp_ColumnWork('auth_role', 'isCustomer', 'int', 1);
#
# ALTER TABLE `auth_dept_user`
# ADD UNIQUE (`userId`, deptId);
#
#
# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2);
# CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1);
#
# CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint ', 2);
#
# CALL Pro_Temp_ColumnWork('io_order_detail_code', 'regStatus', 'varchar(255) ', 1);
# CALL Pro_Temp_ColumnWork('io_order', 'reviewSp', 'tinyint', 1);
#
# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncStatus', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncChange', 'tinyint', 1);
# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1);
#
#
#
# CALL Pro_Temp_ColumnWork('io_order_detail_code', 'id', 'bigint ', 2);
# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'id', 'bigint ', 2);
# CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'bigint ', 2);
#
#
# CALL Pro_Temp_ColumnWork('pur_order_detail', 'price', 'decimal(10, 2)', 1);
INSERT ignore INTO `sys_pdf_template_relevance_label`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (1, 30, 110, 0, 9, '内部码打印', NULL, NULL, NULL, NULL, 'lable');
INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (1, 31, 110, 0, NULL, '配送企业资质打印', NULL, NULL, NULL, NULL, 'reportForms');
INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (2, 32, 110, 0, NULL, '生产企业资质打印', NULL, NULL, NULL, NULL, 'reportForms');
INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (3, 33, 110, 0, NULL, '配送产品资质打印', NULL, NULL, NULL, NULL, 'reportForms');
INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (4, 33, 110, 0, NULL, '库存报表打印', NULL, NULL, NULL, NULL, 'reportForms');
INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (5, 33, 110, 0, NULL, '内部码报表打印', NULL, NULL, NULL, NULL, 'reportForms');
CALL Pro_Temp_ColumnWork('basic_udirel', 'zdcfsycs', 'int', 1);

Loading…
Cancel
Save