Merge remote-tracking branch 'origin/master'

master
chengqf 2 years ago
commit d58c433293

@ -31,6 +31,10 @@ public class BasicProcessStatus {
public static final String NEW_ALL_BUS_ORDER = "11";
public static final String NEW_ALL_DI = "10";
public static final String NEW_ALL_THR_DATA = "12"; //所有第三方基础数据
public static final String NEW_ALL_THR_PRODUCTS = "13"; //所有第三方产品数据
public static final String NEW_ALL_SYS_SETTING = "14"; //所有系统设置数据
public static final int SCHEDULE_NORMAL = 1; //常规任务
public static final int SCHEDULE_TRANSFER = 2; //需要传递任务

@ -227,6 +227,9 @@ public class ConstantStatus {
public static final String SYNC_BUS_TYPE = "AutoUploadBusType";
public static final String SYNC_SCAN_ORDER = "AutoUploadOrder";
public static final String SYNC_DI_PRODUCTS = "AutoDownloadDiProducts";
public static final String SYNC_THR_DATA = "AutoUploadThrData";
public static final String SYNC_THR_PRODUCTS = "AutoUploadThrProducts";
public static final String SYNC_SYS_SETTING = "AutoUploadSysSetting";
//自动下载所有数据
public static final String SYNC_DOWNLOAD_BASIC_DATA = "AutoDownloadAllData";

@ -186,7 +186,7 @@ public class InvWarehouseController extends BaseController {
@AuthRuleAnnotation("")
@PostMapping("/spms/sub/inv/warehouse/save")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity,
public BaseResponse save(@RequestBody InvWarehouseEntity invWarehouseEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
@ -437,8 +437,8 @@ public class InvWarehouseController extends BaseController {
//1.获取所有单据类型
FilterBussinessTypeRequest filterBussinessTypeRequest = new FilterBussinessTypeRequest();
filterBussinessTypeRequest.setEnable(true);
if (invWarehouseEntity.getAdvanceType()) {
filterBussinessTypeRequest.setAdvanceType(true);
if (invWarehouseEntity.getAdvanceType() == 2) {
filterBussinessTypeRequest.setAdvanceType(2);
}
List<BasicBussinessTypeEntity> basicBussinessTypeEntities = basicBussinessTypeService.findList(filterBussinessTypeRequest);

@ -20,6 +20,7 @@ import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.inv.InvPreInProductDetailEntity;
import com.glxp.api.entity.inv.InvPreinDetailEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
@ -35,6 +36,7 @@ import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.*;
import com.glxp.api.service.inout.*;
import com.glxp.api.service.inv.InvPreinDetailService;
import com.glxp.api.service.inv.InvPreinProductDetailService;
import com.glxp.api.service.inv.InvProductDetailService;
import com.glxp.api.service.purchase.SupProductService;
import com.glxp.api.service.system.SystemParamConfigService;
@ -85,7 +87,7 @@ public class IoCodeTempController extends BaseController {
@Resource
IoCheckInoutService ioCheckInoutService;
@Resource
InvPreinDetailService invPreinDetailService;
InvPreinProductDetailService invPreinProductDetailService;
@Resource
InvProductDetailService invProductDetailService;
@ -452,7 +454,7 @@ public class IoCodeTempController extends BaseController {
//校验预验收是否已存在
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
int count = invPreinDetailService.findCountByCode(code);
int count = invPreinProductDetailService.findCountByCode(code);
if (count > 0) {
return ResultVOUtils.error(500, "预验收库存已存在此UDI码,请检查后重试!");
}
@ -461,8 +463,11 @@ public class IoCodeTempController extends BaseController {
//校验预验收库存是否已存在
if (bussinessTypeEntity.isScanPreIn()) {
int preInCount = invPreinDetailService.findCountByCode(code);
InvPreinDetailEntity invPreinDetailEntity = invPreinDetailService.findUseOneByCode(code);
int preInCount = invPreinProductDetailService.findCountByCode(code);
InvPreInProductDetailEntity invPreinDetailEntity = invPreinProductDetailService.findUseOneByCode(code);
if (preInCount <= 0) {
return ResultVOUtils.error(500, "预验收库存数量不足!");
} else {

@ -512,5 +512,12 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.success();
}
@PostMapping("/udiwms/inout/order/updateOrder")
@Log(title = "单据管理", businessType = BusinessType.UPDATE)
public BaseResponse updateOrder(@RequestBody IoOrderEntity ioOrderEntity) {
orderService.updateByBillNo(ioOrderEntity);
return ResultVOUtils.success();
}
}

@ -580,5 +580,32 @@ public class IoOrderDetailBizController extends BaseController {
}
/**
*
*
* @param orderDetailBizRequest
* @return
*/
@GetMapping("/udiwms/inout/bizDetail/filterBizOrderList")
public BaseResponse filterBizOrderList(FilterOrderDetailBizRequest orderDetailBizRequest) {
List<IoOrderDetailBizResponse> list = orderDetailBizService.filterList(orderDetailBizRequest);
for (IoOrderDetailBizResponse ioOrderDetailBizResponse : list) {
String msg="";
IoOrderInvoiceEntity ioOrderInvoiceEntity=new IoOrderInvoiceEntity();
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizResponse.getOrderIdFk());
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList=ioOrderInvoiceService.selectOrderInvoice(ioOrderInvoiceEntity);
for(IoOrderInvoiceEntity obj:ioOrderInvoiceEntityList){
if(StrUtil.isNotEmpty(obj.getInvoiceCode())){
msg+=","+obj.getInvoiceCode();
}
}
if(msg.length()>1){
msg=msg.substring(1);
}
ioOrderDetailBizResponse.setInvoiceCodes(msg);
}
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
}

@ -2,34 +2,33 @@ package com.glxp.api.controller.sync;
import cn.hutool.core.collection.CollUtil;
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.constant.BasicProcessStatus;
import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.controller.purchase.PurOrderController;
import com.glxp.api.dao.auth.*;
import com.glxp.api.dao.basic.*;
import com.glxp.api.dao.basic.BasicBusTypeChangeDao;
import com.glxp.api.dao.basic.BasicBusTypePreDao;
import com.glxp.api.dao.basic.BasicBussinessTypeDao;
import com.glxp.api.dao.basic.EntrustReceDao;
import com.glxp.api.dao.inout.*;
import com.glxp.api.dao.purchase.PurOrderDao;
import com.glxp.api.dao.purchase.PurOrderDetailDao;
import com.glxp.api.dao.schedule.SystemParamConfigDao;
import com.glxp.api.dao.system.*;
import com.glxp.api.dao.thrsys.*;
import com.glxp.api.entity.auth.*;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.basic.EntrustReceEntity;
import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.purchase.PurOrderDetailEntity;
import com.glxp.api.entity.purchase.PurOrderEntity;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
import com.glxp.api.entity.sync.BasicExportStatusEntity;
import com.glxp.api.entity.sync.SyncDataBustypeEntity;
import com.glxp.api.entity.sync.SyncDataSetEntity;
import com.glxp.api.entity.system.*;
import com.glxp.api.entity.thrsys.*;
import com.glxp.api.req.basic.UdiInfoRequest;
import com.glxp.api.req.sync.SpsSyncDataRequest;
import com.glxp.api.res.sync.*;
import com.glxp.api.res.system.SyncDataSetResponse;
import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.inout.IoAddInoutService;
import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderService;
@ -39,7 +38,6 @@ import com.glxp.api.service.sync.BasicDownloadService;
import com.glxp.api.service.sync.BasicExportService;
import com.glxp.api.service.sync.SpsSyncDownloadService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.DateUtil;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
@ -52,7 +50,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -433,7 +430,7 @@ public class SpsSyncDownloadController {
// 部门信息
if (CollUtil.isNotEmpty(syncDataResponse.getDeptEntityList())) {
for (DeptEntity deptEntity : syncDataResponse.getDeptEntityList()) {
deptDao.insertInvWarehouse(deptEntity);
deptDao.insertOrUpdate(deptEntity);
}
}
// 部门信息关联用户信息
@ -483,13 +480,218 @@ public class SpsSyncDownloadController {
//接收中继服务、UDI管理系统上传基础信息
//@AuthRuleAnnotation("")
@PostMapping("/sps/sync/thrData/upload")
public BaseResponse uploadThrData(@RequestBody @Valid SpsSyncThrDataResponse spsSyncThrDataResponse) {
if (spsSyncThrDataResponse != null) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spsSyncThrDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_THR_DATA);
basicDownloadStatusEntity.setStatus(0);
basicDownloadStatusEntity.setType(BasicProcessStatus.NEW_ALL_THR_DATA);
basicDownloadStatusEntity.setScheduleType(1);
basicDownloadService.insertDownloadStatus(basicDownloadStatusEntity);
StringBuilder remark = new StringBuilder();
//第三方部门信息
if (CollUtil.isNotEmpty(spsSyncThrDataResponse.getDeptEntities())) {
List<ThrDeptEntity> deptEntities = spsSyncThrDataResponse.getDeptEntities();
ThrDeptDao mapper = sqlSession.getMapper(ThrDeptDao.class);
deptEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("第三方部门信息:").append(spsSyncThrDataResponse.getDeptEntities().size()).append("条\n");
//第三方仓库信息
if (CollUtil.isNotEmpty(spsSyncThrDataResponse.getInvWarehouseEntities())) {
List<ThrInvWarehouseEntity> invWarehouseEntities = spsSyncThrDataResponse.getInvWarehouseEntities();
ThrInvWarehouseDao mapper = sqlSession.getMapper(ThrInvWarehouseDao.class);
invWarehouseEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("第三方仓库信息:").append(spsSyncThrDataResponse.getInvWarehouseEntities().size()).append("条\n");
//第三方往来单位信息
if (CollUtil.isNotEmpty(spsSyncThrDataResponse.getCorpEntities())) {
List<ThrCorpEntity> corpEntities = spsSyncThrDataResponse.getCorpEntities();
ThrCorpDao mapper = sqlSession.getMapper(ThrCorpDao.class);
corpEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("第三方往来单位信息:").append(spsSyncThrDataResponse.getCorpEntities().size()).append("条\n");
sqlSession.close();
basicDownloadStatusEntity.setStatus(1);
basicDownloadStatusEntity.setUpdateTime(new Date());
basicDownloadStatusEntity.setEndTime(new Date());
basicDownloadStatusEntity.setRemark(remark.toString());
basicDownloadService.updateDownloadStatus(basicDownloadStatusEntity);
}
return ResultVOUtils.success("上传成功");
}
//接收中继服务、UDI管理系统上传系统设置
//@AuthRuleAnnotation("")
@PostMapping("/sps/sync/sys/setting")
public BaseResponse uploadSysSetting(@RequestBody @Valid SpsSyncSysSettingResponse spsSyncSysSettingResponse) {
if (spsSyncSysSettingResponse != null) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spsSyncSysSettingResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_SYS_SETTING);
basicDownloadStatusEntity.setStatus(0);
basicDownloadStatusEntity.setType(BasicProcessStatus.NEW_ALL_SYS_SETTING);
basicDownloadStatusEntity.setScheduleType(1);
basicDownloadService.insertDownloadStatus(basicDownloadStatusEntity);
StringBuilder remark = new StringBuilder();
//系统运行参数
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSystemParamConfigEntities())) {
List<SystemParamConfigEntity> systemParamConfigEntities = spsSyncSysSettingResponse.getSystemParamConfigEntities();
SystemParamConfigDao mapper = sqlSession.getMapper(SystemParamConfigDao.class);
systemParamConfigEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("系统运行参数:").append(spsSyncSysSettingResponse.getSystemParamConfigEntities().size()).append("条\n");
//委托验收设置
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getEntrustReceEntities())) {
List<EntrustReceEntity> entrustReceEntities = spsSyncSysSettingResponse.getEntrustReceEntities();
EntrustReceDao mapper = sqlSession.getMapper(EntrustReceDao.class);
entrustReceEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("委托验收设置:").append(spsSyncSysSettingResponse.getEntrustReceEntities().size()).append("条\n");
//打印模块
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSystemPDFModuleEntities())) {
List<SystemPDFModuleEntity> systemPDFModuleEntities = spsSyncSysSettingResponse.getSystemPDFModuleEntities();
SystemPDFModuleDao mapper = sqlSession.getMapper(SystemPDFModuleDao.class);
systemPDFModuleEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("打印模块:").append(spsSyncSysSettingResponse.getSystemPDFModuleEntities().size()).append("条\n");
//打印模板
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSystemPDFTemplateEntities())) {
List<SystemPDFTemplateEntity> systemPDFTemplateEntities = spsSyncSysSettingResponse.getSystemPDFTemplateEntities();
SystemPDFTemplateDao mapper = sqlSession.getMapper(SystemPDFTemplateDao.class);
systemPDFTemplateEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("打印模板:").append(spsSyncSysSettingResponse.getSystemPDFTemplateEntities().size()).append("条\n");
//扫码单据关联表
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceCodeEntities())) {
List<SysPdfTemplateRelevanceCodeEntity> sysPdfTemplateRelevanceCodeEntities = spsSyncSysSettingResponse.getSysPdfTemplateRelevanceCodeEntities();
SysPdfTemplateRelevanceCodeDao mapper = sqlSession.getMapper(SysPdfTemplateRelevanceCodeDao.class);
sysPdfTemplateRelevanceCodeEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("扫码单据关联表:").append(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceCodeEntities().size()).append("条\n");
//业务单据关联表
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceBizEntities())) {
List<SysPdfTemplateRelevanceBizEntity> sysPdfTemplateRelevanceBizEntities = spsSyncSysSettingResponse.getSysPdfTemplateRelevanceBizEntities();
SysPdfTemplateRelevanceBizDao mapper = sqlSession.getMapper(SysPdfTemplateRelevanceBizDao.class);
sysPdfTemplateRelevanceBizEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("业务单据关联表:").append(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceBizEntities().size()).append("条\n");
//内部码打印关联表
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceLabelEntities())) {
List<SysPdfTemplateRelevanceLabelEntity> sysPdfTemplateRelevanceLabelEntities = spsSyncSysSettingResponse.getSysPdfTemplateRelevanceLabelEntities();
SysPdfTemplateRelevanceLabelDao mapper = sqlSession.getMapper(SysPdfTemplateRelevanceLabelDao.class);
sysPdfTemplateRelevanceLabelEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("内部码打印关联表:").append(spsSyncSysSettingResponse.getSystemParamConfigEntities().size()).append("条\n");
//资质证书打印关联表
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceStatemenEntities())) {
List<SysPdfTemplateRelevanceStatemenEntity> sysPdfTemplateRelevanceStatemenEntities = spsSyncSysSettingResponse.getSysPdfTemplateRelevanceStatemenEntities();
SysPdfTemplateRelevanceStatemenDao mapper = sqlSession.getMapper(SysPdfTemplateRelevanceStatemenDao.class);
sysPdfTemplateRelevanceStatemenEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("资质证书打印关联表:").append(spsSyncSysSettingResponse.getSysPdfTemplateRelevanceStatemenEntities().size()).append("条\n");
//自动建出入库单设置
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getBasicBusTypePreEntities())) {
List<BasicBusTypePreEntity> basicBusTypePreEntities = spsSyncSysSettingResponse.getBasicBusTypePreEntities();
BasicBusTypePreDao mapper = sqlSession.getMapper(BasicBusTypePreDao.class);
basicBusTypePreEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("自动建出入库单设置:").append(spsSyncSysSettingResponse.getBasicBusTypePreEntities().size()).append("条\n");
//自动建业务单设置
if (CollUtil.isNotEmpty(spsSyncSysSettingResponse.getBasicBusTypeChangeEntities())) {
List<BasicBusTypeChangeEntity> basicBusTypeChangeEntities = spsSyncSysSettingResponse.getBasicBusTypeChangeEntities();
BasicBusTypeChangeDao mapper = sqlSession.getMapper(BasicBusTypeChangeDao.class);
basicBusTypeChangeEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("自动建业务单设置:").append(spsSyncSysSettingResponse.getBasicBusTypeChangeEntities().size()).append("条\n");
sqlSession.close();
basicDownloadStatusEntity.setStatus(1);
basicDownloadStatusEntity.setUpdateTime(new Date());
basicDownloadStatusEntity.setEndTime(new Date());
basicDownloadStatusEntity.setRemark(remark.toString());
basicDownloadService.updateDownloadStatus(basicDownloadStatusEntity);
}
return ResultVOUtils.success("上传成功");
}
//接收中继服务、UDI管理系统上传第三方产品信息
//@AuthRuleAnnotation("")
@PostMapping("/sps/sync/thrData/products/upload")
public BaseResponse uploadThrProducts(@RequestBody @Valid SpsSyncThrProductsResponse spsSyncThrProductsResponse) {
if (spsSyncThrProductsResponse != null) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spsSyncThrProductsResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_THR_PRODUCTS);
basicDownloadStatusEntity.setStatus(0);
basicDownloadStatusEntity.setType(BasicProcessStatus.NEW_ALL_THR_PRODUCTS);
basicDownloadStatusEntity.setScheduleType(1);
basicDownloadService.insertDownloadStatus(basicDownloadStatusEntity);
StringBuilder remark = new StringBuilder();
//第三方产品信息
if (CollUtil.isNotEmpty(spsSyncThrProductsResponse.getProductsEntities())) {
List<ThrProductsEntity> productsEntities = spsSyncThrProductsResponse.getProductsEntities();
ThrProductsDao mapper = sqlSession.getMapper(ThrProductsDao.class);
productsEntities.forEach(mapper::insertOrUpdate);
}
sqlSession.commit();
remark.append("第三方产品信息:").append(spsSyncThrProductsResponse.getProductsEntities().size()).append("条\n");
sqlSession.close();
basicDownloadStatusEntity.setStatus(1);
basicDownloadStatusEntity.setUpdateTime(new Date());
basicDownloadStatusEntity.setEndTime(new Date());
basicDownloadStatusEntity.setRemark(remark.toString());
basicDownloadService.updateDownloadStatus(basicDownloadStatusEntity);
}
return ResultVOUtils.success("上传成功");
}
}

@ -21,4 +21,6 @@ public interface BasicBusTypeChangeDao extends BaseMapperPlus<BasicBusTypeChange
* @return
*/
List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest);
boolean insertOrUpdate(BasicBusTypeChangeEntity record);
}

@ -42,4 +42,6 @@ public interface BasicBusTypePreDao extends BaseMapperPlus<BasicBusTypePreDao, B
*/
List<BasicBusTypePreResponse> selectBusTypePreResList(FilterBusTypePreRequest filterBusTypePreRequest);
boolean insertOrUpdate(BasicBusTypePreEntity record);
}

@ -27,5 +27,6 @@ public interface EntrustReceDao extends BaseMapperPlus<EntrustReceDao, EntrustRe
boolean deleteAll();
boolean insertOrUpdate(EntrustReceEntity record);
}

@ -5,9 +5,13 @@ import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface IoOrderInvoiceMapper extends BaseMapperPlus<IoOrderInvoiceMapper, IoOrderInvoiceEntity, IoOrderInvoiceEntity> {
boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
List<IoOrderInvoiceEntity> selectOrderInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
}

@ -29,4 +29,6 @@ public interface SystemParamConfigDao {
boolean insert(SystemParamConfigEntity systemParamConfigEntity);
int insertOrUpdate(SystemParamConfigEntity record);
}

@ -1,19 +1,17 @@
package com.glxp.api.dao.system;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.system.SysMenuHelpEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import java.util.List;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysPdfTemplateRelevanceBizDao extends BaseMapper<SysPdfTemplateRelevanceBizEntity> {
List<SystemPDFTemplateRelevanceResponse> filterList(FilterPdfTemplateRelevanceRequest systemPDFModuleRequest);
boolean upInsert(SysPdfTemplateRelevanceBizEntity sysPdfTemplateRelevanceBizEntity);
boolean insertOrUpdate(SysPdfTemplateRelevanceBizEntity sysPdfTemplateRelevanceBizEntity);
}

@ -1,16 +1,13 @@
package com.glxp.api.dao.system;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity;
import java.util.List;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysPdfTemplateRelevanceCodeDao extends BaseMapper<SysPdfTemplateRelevanceCodeEntity> {
List<SystemPDFTemplateRelevanceResponse> filterList(FilterPdfTemplateRelevanceRequest systemPDFModuleRequest);
@ -19,6 +16,6 @@ public interface SysPdfTemplateRelevanceCodeDao extends BaseMapper<SysPdfTemplat
SysPdfTemplateRelevanceCodeEntity selectNameAndAction(@Param("name") String name, @Param("localAction") String localAction);
boolean insertOrUpdate(SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity);
}

@ -1,16 +1,15 @@
package com.glxp.api.dao.system;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import java.util.List;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysPdfTemplateRelevanceLabelDao extends BaseMapper<SysPdfTemplateRelevanceLabelEntity> {
List<SystemPDFTemplateRelevanceResponse> filterList(FilterPdfTemplateRelevanceRequest systemPDFModuleRequest);
boolean insertOrUpdate(SysPdfTemplateRelevanceLabelEntity sysPdfTemplateRelevanceLabelEntity);
}

@ -1,17 +1,16 @@
package com.glxp.api.dao.system;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import java.util.List;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysPdfTemplateRelevanceStatemenDao extends BaseMapper<SysPdfTemplateRelevanceStatemenEntity> {
List<SystemPDFTemplateRelevanceResponse> filterList(FilterPdfTemplateRelevanceRequest systemPDFModuleRequest);
boolean insertOrUpdate(SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity);
}

@ -1,6 +1,5 @@
package com.glxp.api.dao.system;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -27,4 +26,6 @@ public interface SystemPDFModuleDao {
boolean insert(SystemPDFModuleEntity systemPDFModuleEntity);
boolean deleteById(Integer id);
boolean insertOrUpdate(SystemPDFModuleEntity systemPDFModuleEntity);
}

@ -23,4 +23,6 @@ public interface SystemPDFTemplateDao {
boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity);
boolean deleteById(Integer id);
boolean insertOrUpdate(SystemPDFTemplateEntity systemPDFTemplateEntity);
}

@ -36,4 +36,5 @@ public interface ThrCorpDao {
ThrSystemDetailEntity selectByKey(@Param("key") String key, @Param("thirdSys") String thirdSys);
boolean insertOrUpdate(ThrCorpEntity thrCorpEntity);
}

@ -30,4 +30,6 @@ public interface ThrDeptDao {
ThrDeptEntity selectByCode(@Param("code") String code);
ThrDeptEntity selectMaxCode(FilterThrDeptRequest filterThrDeptRequest);
boolean insertOrUpdate(ThrDeptEntity thrDeptEntity);
}

@ -33,4 +33,5 @@ public interface ThrInvWarehouseDao {
List<ThrInvWarehouseResponse> filterThrInvWarehouseResponse(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest);
boolean insertOrUpdate(ThrInvWarehouseEntity thrInvWarehouseEntity);
}

@ -1,10 +1,8 @@
package com.glxp.api.dao.thrsys;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.res.thrsys.ThrProductsResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -33,6 +31,6 @@ public interface ThrProductsDao {
List<ThrProductsEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest);
int insertOrUpdate(ThrProductsEntity record);
}

@ -86,7 +86,8 @@ public class InvWarehouseEntity {
*
*/
@TableField(value = "advanceType")
private Boolean advanceType;
private Integer advanceType;
@TableField(value = "spUse")
private Boolean spUse;
@TableField(value = "updateTime")

@ -315,7 +315,7 @@ public class BasicBussinessTypeEntity {
// @TableField(value = "preIn")
// private boolean preIn;
// 预验收剩余库存自动退库
@TableField(value = "preInBack")
private boolean preInBack;
@ -396,9 +396,10 @@ public class BasicBussinessTypeEntity {
@TableField(value = "checkCertExpire")
private boolean checkCertExpire;
// 预验收退库单据类型
@TableField(value = "preInBackAction")
private String preInBackAction;
// 预验收剩余库存退库方式 1:按单使用或退库2按货位/仓库使用或退库
@TableField(value = "backPreinType")
private Integer backPreinType;
}

@ -238,4 +238,7 @@ public class IoOrderEntity {
@TableField(value = "suppleCount")
private Integer suppleCount; //补单次数
@TableField(value = "checkStatus")
private Integer checkStatus; //确认状态
}

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* PDF
*/
@ -59,4 +61,7 @@ public class SysPdfTemplateRelevanceBizEntity {
@TableField(value = "`modelKey`")
private String modelKey;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* PDF
*/
@ -60,4 +62,7 @@ public class SysPdfTemplateRelevanceCodeEntity {
@TableField(value = "`modelKey`")
private String modelKey;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* PDF
*/
@ -59,4 +61,7 @@ public class SysPdfTemplateRelevanceLabelEntity {
@TableField(value = "`modelKey`")
private String modelKey;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* PDF
*/
@ -62,4 +64,7 @@ public class SysPdfTemplateRelevanceStatemenEntity {
@TableField(value = "`modelKey`")
private String modelKey;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -1,5 +1,6 @@
package com.glxp.api.entity.system;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.Date;
@ -21,4 +22,7 @@ public class SystemPDFModuleEntity {
private String remark2;
private String remark3;
private String modelKey;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class SystemPDFTemplateEntity {
@ -24,4 +23,7 @@ public class SystemPDFTemplateEntity {
private String jrxmlPath;
private Integer bussinessType;
private String bussinessStatus;
@TableField(value = "updateTime")
private Date updateTime;
}

@ -2,6 +2,8 @@ package com.glxp.api.entity.system;
import lombok.Data;
import java.util.Date;
@Data
public class SystemParamConfigEntity {
@ -13,4 +15,6 @@ public class SystemParamConfigEntity {
private int paramStatus;
private int paramType;
private String paramExplain;
private Date updateTime;
}

@ -34,4 +34,4 @@ public class ThrDeptEntity {
*
*/
private String thirdSysFk;
}
}

@ -2,6 +2,8 @@ package com.glxp.api.entity.thrsys;
import lombok.Data;
import java.util.Date;
@Data
public class ThrInvWarehouseEntity {
@ -14,5 +16,6 @@ public class ThrInvWarehouseEntity {
private String thirdSysFk;
private String parentName;
private Date updateTime;
}

@ -11,7 +11,7 @@ public class FilterInvSubWarehouseRequest extends ListPageRequest {
private String name;
private String parentId;
private Boolean defaultInv;
private Boolean advanceType;
private Integer advanceType;
public String thirdId;
public String thirdId1;

@ -299,6 +299,7 @@ public class BussinessTypeSaveRequest {
private boolean checkExpire;
private boolean checkCertExpire;
private String preInBackAction;
private Integer backPreinType;
}

@ -44,7 +44,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
/**
*
*/
private Boolean advanceType;
private Integer advanceType;
private String type;

@ -2,6 +2,8 @@ package com.glxp.api.req.system;
import lombok.Data;
import java.util.Date;
@Data
public class SysParamConfigSaveRequest {
@ -13,4 +15,5 @@ public class SysParamConfigSaveRequest {
private int paramStatus;
private int paramType;
private String paramExplain;
private Date updateTime;
}

@ -21,6 +21,6 @@ public class InvSubWarehouseResponse {
private boolean defaultInv;
private String parentCode;
private String parentInvName;
private Boolean advanceType;
private Integer advanceType;
private Boolean spUse;
}

@ -148,4 +148,5 @@ public class BasicBussinessTypeResponse {
private boolean checkExpire;
private boolean checkCertExpire;
private String preInBackAction;
private Integer backPreinType;
}

@ -161,6 +161,8 @@ public class IoOrderDetailBizResponse {
private String checkFileName;
private String invoiceCodes;
}

@ -0,0 +1,37 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.entity.basic.EntrustReceEntity;
import com.glxp.api.entity.system.*;
import lombok.Data;
import java.util.List;
/**
*
*/
@Data
public class SpsSyncSysSettingResponse extends BaseSyncResponse {
private List<SystemParamConfigEntity> systemParamConfigEntities;
private List<EntrustReceEntity> entrustReceEntities;
private List<SystemPDFModuleEntity> systemPDFModuleEntities;
private List<SystemPDFTemplateEntity> systemPDFTemplateEntities;
private List<SysPdfTemplateRelevanceCodeEntity> sysPdfTemplateRelevanceCodeEntities;
private List<SysPdfTemplateRelevanceBizEntity> sysPdfTemplateRelevanceBizEntities;
private List<SysPdfTemplateRelevanceLabelEntity> sysPdfTemplateRelevanceLabelEntities;
private List<SysPdfTemplateRelevanceStatemenEntity> sysPdfTemplateRelevanceStatemenEntities;
private List<BasicBusTypePreEntity> basicBusTypePreEntities;
private List<BasicBusTypeChangeEntity> basicBusTypeChangeEntities;
}

@ -0,0 +1,31 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.thrsys.ThrCorpEntity;
import com.glxp.api.entity.thrsys.ThrDeptEntity;
import com.glxp.api.entity.thrsys.ThrInvWarehouseEntity;
import lombok.Data;
import java.util.List;
/**
*
*/
@Data
public class SpsSyncThrDataResponse extends BaseSyncResponse {
/**
*
*/
private List<ThrDeptEntity> deptEntities;
/**
*
*/
private List<ThrInvWarehouseEntity> invWarehouseEntities;
/**
*
*/
private List<ThrCorpEntity> corpEntities;
}

@ -0,0 +1,19 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import lombok.Data;
import java.util.List;
/**
*
*/
@Data
public class SpsSyncThrProductsResponse extends BaseSyncResponse {
/**
*
*/
private List<ThrProductsEntity> productsEntities;
}

@ -19,11 +19,13 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inv.InvPreinDetailService;
import com.glxp.api.service.inv.InvPreinOrderService;
import com.glxp.api.service.inv.InvPreinProductDetailService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.JasperUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import net.sf.jasperreports.engine.JRException;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
@ -731,6 +733,10 @@ public class IoCheckInoutService {
@Resource
IoChangeInoutService changeInoutService;
@Resource
InvPreinProductDetailService invPreinProductDetailService;
@Resource
UdiCalCountUtil udiCalCountUtil;
//校验完成后生成库存
public void genInv(IoOrderEntity orderEntity, BasicBussinessTypeEntity bussinessTypeEntity) {
@ -738,163 +744,175 @@ public class IoCheckInoutService {
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT) && bussinessTypeEntity.isScanPreIn()) {
ThreadUtil.execAsync(() -> {
List<IoCodeEntity> backCodeList = new ArrayList<>();
List<IoCodeEntity> codeList = codeService.findByOrderId(orderEntity.getBillNo());
//找出UDI码对应的预验收入库单号
Map<String, String> preInOrder = new HashMap<>();
for (IoCodeEntity warehouseEntity : codeList) {
List<InvPreinDetailEntity> invProductDetailEntities = invPreinDetailService.findByCode(warehouseEntity.getCode());
if (invProductDetailEntities.size() > 0) {
for (InvPreinDetailEntity invPreinDetailEntity : invProductDetailEntities)
preInOrder.put(invPreinDetailEntity.getOrderId(), invPreinDetailEntity.getOrderId());
for (IoCodeEntity codeEntity : codeList) {
int count = invPreinProductDetailService.findCountByCode(codeEntity.getCode());
if (count > 0) {
codeEntity.setCount(count);
codeEntity.setReCount(udiCalCountUtil.getActCount(codeEntity.getNameCode()));
backCodeList.add(codeEntity);
}
}
if (preInOrder.size() > 0) {
String preInBillNo = "";
boolean isBreak = false;
List<IoCodeEntity> backCodeList = new ArrayList<>();
for (String key : preInOrder.keySet()) {
if (!isBreak) {
preInBillNo = preInBillNo + "," + key;
IoOrderEntity preInEntity = orderService.findByBillNo(key);
preInEntity.setPreOutBillNo(orderEntity.getBillNo());
orderService.update(preInEntity);
BasicBussinessTypeEntity preBusType = basicBussinessTypeService.findByAction(preInEntity.getAction());
//预验收不删除单号,方便后续查询
if (preBusType.isPreInBack()) { //预验收如果带回,则清空相关预验收库存;
invPreinDetailService.deleteByOrderId(preInEntity.getBillNo());
//剩余UDI码生成退货单 todo
List<IoCodeEntity> codeEntities = codeService.findByOrderId(preInBillNo);
backCodeList.addAll(codeEntities);
} else { //预验收如果不带回,则清除已出库相关库存
for (IoCodeEntity codeEntity : codeList) {
if (StrUtil.isEmpty(codeEntity.getSerialNo())) {
InvPreinDetailEntity invPreinDetailEntity = invPreinDetailService.findByCode(key, codeEntity.getCode());
if (invPreinDetailEntity != null) {
int count = 0;
if (invPreinDetailEntity.getCount() < codeEntity.getCount()) {
count = 0;
} else {
count = invPreinDetailEntity.getCount() - codeEntity.getCount();
}
if (count >= 0) {
isBreak = true;
if (count == 0) {
invPreinDetailService.deleteByCode(key, codeEntity.getCode());
} else {
invPreinDetailEntity.setCount(count);
invPreinDetailService.update(invPreinDetailEntity);
}
int reCount = invPreinDetailEntity.getReCount() - codeEntity.getMyReCount();
if (reCount == 0) {
invPreinDetailService.deleteByCode(key, codeEntity.getCode());
} else {
invPreinDetailEntity.setReCount(reCount);
invPreinDetailService.update(invPreinDetailEntity);
}
}
}
} else {
invPreinDetailService.deleteByCode(key, codeEntity.getCode());
}
}
}
}
}
orderEntity.setPreInBillNo(preInBillNo.substring(1));
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (StrUtil.isNotEmpty(basicBussinessTypeEntity.getPreInBackAction())) {
IoOrderEntity outOrder = new IoOrderEntity();
// BeanUtils.copyProperties(orderEntity, outOrder);
outOrder.setId(null);
outOrder.setMainAction(ConstantType.TYPE_OUT);
outOrder.setAction(basicBussinessTypeEntity.getAction());
outOrder.setCreateTime(new Date());
outOrder.setFromType(ConstantStatus.FROM_CHANGE);
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(basicBussinessTypeEntity.getPrefix()), "yyyyMMdd"));
outOrder.setBillNo(orderNo);
outOrder.setCustomerId(Constant.SYSTEM_CUSTOMER_ID);
outOrder.setCorpOrderId(CustomUtil.getId() + "x");
outOrder.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderEntity.setUllageSupNo(outOrder.getBillNo());
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);
outOrder.setOriginUllageSupNo(orderEntity.getBillNo());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
orderService.insertOrder(outOrder);
//生成条码
List<IoCodeTempEntity> codeTempEntities = new ArrayList<>();
for (IoCodeEntity warehouseEntity : backCodeList) {
IoCodeTempEntity codeTempEntity = new IoCodeTempEntity();
BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
codeTempEntity.setId(null);
codeTempEntity.setOrderId(outOrder.getBillNo());
codeTempEntity.setAction(outOrder.getAction());
codeTempEntity.setMainAction(outOrder.getMainAction());
codeTempEntity.setCreateTime(new Date());
codeTempEntity.setUpdateTime(new Date());
codeTempEntities.add(codeTempEntity);
}
codeTempService.insertBatch(codeTempEntities);
addInoutService.dealProcess(outOrder);
if (!checkManual(outOrder.getBillNo())) {
check(outOrder.getBillNo());
}
//生成退货单 1.查出所有关联的单据条码2.扣减当前出库数量3.生成单据类型对应绑定的出库单
if (CollUtil.isNotEmpty(backCodeList)) {
List<IoCodeEntity> realBackCodeList = new ArrayList<>();
for (IoCodeEntity backCodeEntity : backCodeList) {
for (IoCodeEntity codeEntity : codeList) {
if (codeEntity.getCount() != 0 && backCodeEntity.getCode().equals(codeEntity.getCode())) {
int count = backCodeEntity.getCount() - codeEntity.getCount();
int reCount = backCodeEntity.getReCount() - codeEntity.getReCount();
if (count > 0) {
codeEntity.setCount(0);
codeEntity.setReCount(0);
backCodeEntity.setCount(count);
backCodeEntity.setReCount(reCount);
realBackCodeList.add(backCodeEntity);
} else if (count == 0) {
codeEntity.setCount(0);
codeEntity.setReCount(0);
} else if (count < 0) {
codeEntity.setCount(-count);
codeEntity.setReCount(-reCount);
}
}
}
}
if (CollUtil.isNotEmpty(realBackCodeList)) {
Map<String, List<IoCodeEntity>> backPreInOrder = new HashMap<>();
for (IoCodeEntity codeEntity : codeList) {
List<IoCodeEntity> codeEntities = backPreInOrder.get(codeEntity.getOrderId());
if (CollUtil.isEmpty(codeEntities)) {
codeEntities = new ArrayList<>();
}
codeEntities.add(codeEntity);
backPreInOrder.put(codeEntity.getOrderId(), codeEntities);
}
for (String key : backPreInOrder.keySet()) {
IoOrderEntity originOrder = orderService.findByBillNo(key);
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(originOrder.getAction());
if (StrUtil.isNotEmpty(basicBussinessTypeEntity.getPreInBackAction())) {
IoOrderEntity outOrder = new IoOrderEntity();
BeanUtils.copyProperties(originOrder, outOrder);
outOrder.setId(null);
outOrder.setMainAction(ConstantType.TYPE_OUT);
outOrder.setAction(basicBussinessTypeEntity.getAction());
outOrder.setCreateTime(new Date());
outOrder.setFromType(ConstantStatus.FROM_CHANGE);
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(basicBussinessTypeEntity.getPrefix()), "yyyyMMdd"));
outOrder.setBillNo(orderNo);
outOrder.setCustomerId(Constant.SYSTEM_CUSTOMER_ID);
outOrder.setCorpOrderId(CustomUtil.getId() + "x");
outOrder.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
originOrder.setUllageSupNo(outOrder.getBillNo());
originOrder.setUpdateTime(new Date());
orderService.update(originOrder);
outOrder.setOriginUllageSupNo(originOrder.getBillNo());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
orderService.insertOrder(outOrder);
//生成条码
List<IoCodeTempEntity> codeTempEntities = new ArrayList<>();
for (IoCodeEntity warehouseEntity : backPreInOrder.get(key)) {
IoCodeTempEntity codeTempEntity = new IoCodeTempEntity();
BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
codeTempEntity.setId(null);
codeTempEntity.setOrderId(outOrder.getBillNo());
codeTempEntity.setAction(outOrder.getAction());
codeTempEntity.setMainAction(outOrder.getMainAction());
codeTempEntity.setCreateTime(new Date());
codeTempEntity.setUpdateTime(new Date());
codeTempEntities.add(codeTempEntity);
}
codeTempService.insertBatch(codeTempEntities);
addInoutService.dealProcess(outOrder);
if (!checkManual(outOrder.getBillNo())) {
check(outOrder.getBillNo());
}
}
}
}
}
}
// //找出UDI码对应的预验收入库单号
// Map<String, String> preInOrder = new HashMap<>();
// for (IoCodeEntity warehouseEntity : codeList) {
// List<InvPreinDetailEntity> invProductDetailEntities = invPreinDetailService.findByCode(warehouseEntity.getCode());
// if (invProductDetailEntities.size() > 0) {
// for (InvPreinDetailEntity invPreinDetailEntity : invProductDetailEntities)
// preInOrder.put(invPreinDetailEntity.getOrderId(), invPreinDetailEntity.getOrderId());
// }
// }
// if (preInOrder.size() > 0) {
// String preInBillNo = "";
// boolean isBreak = false;
//
// for (String key : preInOrder.keySet()) {
// if (!isBreak) {
// preInBillNo = preInBillNo + "," + key;
// IoOrderEntity preInEntity = orderService.findByBillNo(key);
// preInEntity.setPreOutBillNo(orderEntity.getBillNo());
// orderService.update(preInEntity);
// BasicBussinessTypeEntity preBusType = basicBussinessTypeService.findByAction(preInEntity.getAction());
// //预验收不删除单号,方便后续查询
// if (preBusType.isPreInBack()) { //预验收如果带回,则清空相关预验收库存;
// invPreinDetailService.deleteByOrderId(preInEntity.getBillNo());
// //剩余UDI码生成退货单 todo
// List<IoCodeEntity> codeEntities = codeService.findByOrderId(key);
// backCodeList.addAll(codeEntities);
// } else { //预验收如果不带回,则清除已出库相关库存
// for (IoCodeEntity codeEntity : codeList) {
// if (StrUtil.isEmpty(codeEntity.getSerialNo())) {
// InvPreinDetailEntity invPreinDetailEntity = invPreinDetailService.findByCode(key, codeEntity.getCode());
// if (invPreinDetailEntity != null) {
// int count = 0;
// if (invPreinDetailEntity.getCount() < codeEntity.getCount()) {
// count = 0;
// } else {
// count = invPreinDetailEntity.getCount() - codeEntity.getCount();
// }
// if (count >= 0) {
// isBreak = true;
// if (count == 0) {
// invPreinDetailService.deleteByCode(key, codeEntity.getCode());
// } else {
// invPreinDetailEntity.setCount(count);
// invPreinDetailService.update(invPreinDetailEntity);
// }
// int reCount = invPreinDetailEntity.getReCount() - codeEntity.getMyReCount();
// if (reCount == 0) {
// invPreinDetailService.deleteByCode(key, codeEntity.getCode());
// } else {
// invPreinDetailEntity.setReCount(reCount);
// invPreinDetailService.update(invPreinDetailEntity);
// }
// }
// }
// } else {
// invPreinDetailService.deleteByCode(key, codeEntity.getCode());
// }
// }
//
// }
// }
//
//
// }
// orderEntity.setPreInBillNo(preInBillNo.substring(1));
// orderService.update(orderEntity);
//
//
// //生成退货单 1.查出所有关联的单据条码2.扣减当前出库数量3.生成单据类型对应绑定的出库单
// if (CollUtil.isNotEmpty(backCodeList)) {
// List<IoCodeEntity> realBackCodeList = new ArrayList<>();
// for (IoCodeEntity backCodeEntity : backCodeList) {
// for (IoCodeEntity codeEntity : codeList) {
// if (codeEntity.getCount() != 0 && backCodeEntity.getCode().equals(codeEntity.getCode())) {
// int count = backCodeEntity.getCount() - codeEntity.getCount();
// int reCount = backCodeEntity.getReCount() - codeEntity.getReCount();
// if (count > 0) {
// codeEntity.setCount(0);
// codeEntity.setReCount(0);
// backCodeEntity.setCount(count);
// backCodeEntity.setReCount(reCount);
// realBackCodeList.add(backCodeEntity);
// } else if (count == 0) {
// codeEntity.setCount(0);
// codeEntity.setReCount(0);
// } else if (count < 0) {
// codeEntity.setCount(-count);
// codeEntity.setReCount(-reCount);
// }
// }
// }
//
// }
// if (CollUtil.isNotEmpty(realBackCodeList)) {
// Map<String, List<IoCodeEntity>> backPreInOrder = new HashMap<>();
// for (IoCodeEntity codeEntity : codeList) {
// List<IoCodeEntity> codeEntities = backPreInOrder.get(codeEntity.getOrderId());
// if (CollUtil.isEmpty(codeEntities)) {
// codeEntities = new ArrayList<>();
// }
// codeEntities.add(codeEntity);
// backPreInOrder.put(codeEntity.getOrderId(), codeEntities);
// }
//
// for (String key : backPreInOrder.keySet()) {
// IoOrderEntity originOrder = orderService.findByBillNo(key);
// BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(originOrder.getAction());
//
// }
// }
// }
// }
});
}

@ -16,4 +16,7 @@ public interface IoOrderInvoiceService {
boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
List<IoOrderInvoiceEntity> selectOrderInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
}

@ -43,4 +43,9 @@ public class IoOrderInvoiceServiceImpl implements IoOrderInvoiceService {
public boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity) {
return ioOrderInvoiceMapper.insert(ioOrderInvoiceEntity) > 0;
}
@Override
public List<IoOrderInvoiceEntity> selectOrderInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity) {
return ioOrderInvoiceMapper.selectOrderInvoice(ioOrderInvoiceEntity);
}
}

@ -2,6 +2,7 @@ package com.glxp.api.service.inv;
import com.glxp.api.entity.inv.InvPreInProductDetailEntity;
import com.glxp.api.entity.inv.InvPreProductDetailEntity;
import com.glxp.api.entity.inv.InvPreinDetailEntity;
import com.glxp.api.req.inv.FilterInvPreProductDetailRequest;
import com.glxp.api.req.inv.FilterInvProductDetailRequest;
import com.glxp.api.res.inv.InvPreProductDetailResponse;
@ -19,6 +20,8 @@ public interface InvPreinProductDetailService {
List<InvPreInProductDetailEntity> selectByOrderIdFk(String billNo);
List<InvPreInProductDetailEntity> findByCode(String code);
InvPreInProductDetailEntity selectByCode(String billNo, String code);
boolean update(InvPreInProductDetailEntity invPreInProductDetailEntity);
@ -49,5 +52,7 @@ public interface InvPreinProductDetailService {
*/
boolean deleteInvPreProductDetail(FilterInvProductDetailRequest detailRequest);
int findCountByCode(String code);
InvPreInProductDetailEntity findUseOneByCode(String code);
}

@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.dao.basic.BasicBussinessTypeDao;
import com.glxp.api.dao.basic.UdiProductDao;
@ -13,6 +14,7 @@ import com.glxp.api.dao.inv.InvPreProductDetailDao;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.inv.InvPreInProductDetailEntity;
import com.glxp.api.entity.inv.InvPreinDetailEntity;
import com.glxp.api.req.inv.FilterInvPreProductDetailRequest;
import com.glxp.api.req.inv.FilterInvProductDetailRequest;
import com.glxp.api.res.inv.InvPreProductDetailResponse;
@ -59,6 +61,12 @@ public class InvPreInProductDetailServiceImpl implements InvPreinProductDetailSe
return invProductDetailEntities;
}
@Override
public List<InvPreInProductDetailEntity> findByCode(String code) {
List<InvPreInProductDetailEntity> invPreinDetailEntities = invPreInProductDetailDao.selectList(new QueryWrapper<InvPreInProductDetailEntity>().eq("code", code));
return invPreinDetailEntities;
}
@Override
public InvPreInProductDetailEntity selectByCode(String billNo, String code) {
List<InvPreInProductDetailEntity> invProductDetailEntities = invPreInProductDetailDao.selectList
@ -132,4 +140,31 @@ public class InvPreInProductDetailServiceImpl implements InvPreinProductDetailSe
return invPreInProductDetailDao.deleteInvPreProductDetail(detailRequest);
}
@Override
public int findCountByCode(String code) {
List<InvPreInProductDetailEntity> invPreinDetailEntities = invPreInProductDetailDao.selectList(new QueryWrapper<InvPreInProductDetailEntity>().eq("code", code));
int count = 0;
if (CollUtil.isNotEmpty(invPreinDetailEntities)) {
for (InvPreInProductDetailEntity invProductDetailEntity : invPreinDetailEntities) {
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT))
count = count + invProductDetailEntity.getReCount();
else {
count = count - invProductDetailEntity.getReCount();
}
}
}
return count;
}
@Override
public InvPreInProductDetailEntity findUseOneByCode(String code) {
List<InvPreInProductDetailEntity> invPreinDetailEntities = invPreInProductDetailDao.selectList(new QueryWrapper<InvPreInProductDetailEntity>().eq("code", code)
.eq("status", ConstantStatus.INVIN_IN).last("limit 1"));
if (CollUtil.isNotEmpty(invPreinDetailEntities)) {
return invPreinDetailEntities.get(0);
}
return null;
}
}

@ -1,16 +1,15 @@
package com.glxp.api.service.system.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.api.dao.system.SysPdfTemplateRelevanceBizDao;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceBizService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
@ -23,11 +22,11 @@ public class SystemPDFTemplateRelevanceBizServiceImpl implements SystemPDFTempla
@Override
public List<SysPdfTemplateRelevanceBizEntity> getListByModelId(Integer modelId) {
QueryWrapper<SysPdfTemplateRelevanceBizEntity> ew=new QueryWrapper();
if(modelId!=null){
ew.eq("moduleId",modelId);
QueryWrapper<SysPdfTemplateRelevanceBizEntity> ew = new QueryWrapper();
if (modelId != null) {
ew.eq("moduleId", modelId);
}
List<SysPdfTemplateRelevanceBizEntity> sysPdfTemplateRelevanceBizEntityList=sysPdfTemplateRelevanceBizDao.selectList(ew);
List<SysPdfTemplateRelevanceBizEntity> sysPdfTemplateRelevanceBizEntityList = sysPdfTemplateRelevanceBizDao.selectList(ew);
return sysPdfTemplateRelevanceBizEntityList;
}
@ -39,19 +38,19 @@ public class SystemPDFTemplateRelevanceBizServiceImpl implements SystemPDFTempla
@Override
public boolean udpateRl(SysPdfTemplateRelevanceBizEntity systemPDFTemplateRelevanceEntity) {
systemPDFTemplateRelevanceEntity.setUpdateTime(new Date());
int count = sysPdfTemplateRelevanceBizDao.updateById(systemPDFTemplateRelevanceEntity);
int count= sysPdfTemplateRelevanceBizDao.updateById(systemPDFTemplateRelevanceEntity);
if(count>0){
return true;
}else{
return false;
}
if (count > 0) {
return true;
} else {
return false;
}
}
@Override
public boolean insert(SysPdfTemplateRelevanceBizEntity sysPdfTemplateRelevanceBizEntity) {
sysPdfTemplateRelevanceBizEntity.setUpdateTime(new Date());
sysPdfTemplateRelevanceBizDao.upInsert(sysPdfTemplateRelevanceBizEntity);
return true;

@ -1,18 +1,15 @@
package com.glxp.api.service.system.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.api.dao.system.SysPdfTemplateRelevanceBizDao;
import com.glxp.api.dao.system.SysPdfTemplateRelevanceCodeDao;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceBizService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceCodeService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
@ -25,11 +22,11 @@ public class SystemPDFTemplateRelevanceCodeServiceImpl implements SystemPDFTempl
@Override
public List<SysPdfTemplateRelevanceCodeEntity> getListByModelId(Integer modelId) {
QueryWrapper<SysPdfTemplateRelevanceCodeEntity> ew=new QueryWrapper();
if(modelId!=null){
ew.eq("moduleId",modelId);
QueryWrapper<SysPdfTemplateRelevanceCodeEntity> ew = new QueryWrapper();
if (modelId != null) {
ew.eq("moduleId", modelId);
}
List<SysPdfTemplateRelevanceCodeEntity> sysPdfTemplateRelevanceCodeEntityList=sysPdfTemplateRelevanceCodeDao.selectList(ew);
List<SysPdfTemplateRelevanceCodeEntity> sysPdfTemplateRelevanceCodeEntityList = sysPdfTemplateRelevanceCodeDao.selectList(ew);
return sysPdfTemplateRelevanceCodeEntityList;
}
@ -42,34 +39,34 @@ public class SystemPDFTemplateRelevanceCodeServiceImpl implements SystemPDFTempl
@Override
public List<SysPdfTemplateRelevanceCodeEntity> selectList(FilterPdfTemplateRelevanceRequest filterPdfTemplateRelevanceRequest) {
QueryWrapper<SysPdfTemplateRelevanceCodeEntity> ew=new QueryWrapper<>();
if(filterPdfTemplateRelevanceRequest.getModelKey()!=null){
ew.eq("modelKey",filterPdfTemplateRelevanceRequest.getModelKey());
QueryWrapper<SysPdfTemplateRelevanceCodeEntity> ew = new QueryWrapper<>();
if (filterPdfTemplateRelevanceRequest.getModelKey() != null) {
ew.eq("modelKey", filterPdfTemplateRelevanceRequest.getModelKey());
}
return sysPdfTemplateRelevanceCodeDao.selectList(ew);
}
@Override
public boolean udpateRl(SysPdfTemplateRelevanceCodeEntity systemPDFTemplateRelevanceEntity) {
systemPDFTemplateRelevanceEntity.setUpdateTime(new Date());
int count = sysPdfTemplateRelevanceCodeDao.updateById(systemPDFTemplateRelevanceEntity);
int count= sysPdfTemplateRelevanceCodeDao.updateById(systemPDFTemplateRelevanceEntity);
if(count>0){
return true;
}else{
return false;
}
if (count > 0) {
return true;
} else {
return false;
}
}
@Override
public boolean insert(SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity) {
sysPdfTemplateRelevanceCodeEntity.setUpdateTime(new Date());
sysPdfTemplateRelevanceCodeDao.upInsert(sysPdfTemplateRelevanceCodeEntity);
return false;
}
@Override
public SysPdfTemplateRelevanceCodeEntity selectNameAndAction(String name, String localAction) {
return sysPdfTemplateRelevanceCodeDao.selectNameAndAction(name,localAction);
return sysPdfTemplateRelevanceCodeDao.selectNameAndAction(name, localAction);
}
}

@ -6,10 +6,10 @@ import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceLabelService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceLabelService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
@ -22,11 +22,11 @@ public class SystemPDFTemplateRelevanceLabelServiceImpl implements SystemPDFTemp
@Override
public List<SysPdfTemplateRelevanceLabelEntity> getListByModelId(Integer modelId) {
QueryWrapper<SysPdfTemplateRelevanceLabelEntity> ew=new QueryWrapper();
if(modelId!=null){
ew.eq("moduleId",modelId);
QueryWrapper<SysPdfTemplateRelevanceLabelEntity> ew = new QueryWrapper();
if (modelId != null) {
ew.eq("moduleId", modelId);
}
List<SysPdfTemplateRelevanceLabelEntity> sysPdfTemplateRelevanceLabelEntityList=sysPdfTemplateRelevanceLabelDao.selectList(ew);
List<SysPdfTemplateRelevanceLabelEntity> sysPdfTemplateRelevanceLabelEntityList = sysPdfTemplateRelevanceLabelDao.selectList(ew);
return sysPdfTemplateRelevanceLabelEntityList;
}
@ -38,13 +38,13 @@ public class SystemPDFTemplateRelevanceLabelServiceImpl implements SystemPDFTemp
@Override
public boolean udpateRl(SysPdfTemplateRelevanceLabelEntity systemPDFTemplateRelevanceEntity) {
systemPDFTemplateRelevanceEntity.setUpdateTime(new Date());
int count = sysPdfTemplateRelevanceLabelDao.updateById(systemPDFTemplateRelevanceEntity);
int count= sysPdfTemplateRelevanceLabelDao.updateById(systemPDFTemplateRelevanceEntity);
if(count>0){
return true;
}else{
return false;
}
if (count > 0) {
return true;
} else {
return false;
}
}
}

@ -6,10 +6,10 @@ import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceStatemenService;
import com.glxp.api.service.system.SystemPDFTemplateRelevanceStatemenService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
@ -22,11 +22,11 @@ public class SystemPDFTemplateRelevanceStatemenServiceImpl implements SystemPDFT
@Override
public List<SysPdfTemplateRelevanceStatemenEntity> getListByModelId(Integer modelId) {
QueryWrapper<SysPdfTemplateRelevanceStatemenEntity> ew=new QueryWrapper();
if(modelId!=null){
ew.eq("moduleId",modelId);
QueryWrapper<SysPdfTemplateRelevanceStatemenEntity> ew = new QueryWrapper();
if (modelId != null) {
ew.eq("moduleId", modelId);
}
List<SysPdfTemplateRelevanceStatemenEntity> sysPdfTemplateRelevanceStatemenEntityList=sysPdfTemplateRelevanceStatemenDao.selectList(ew);
List<SysPdfTemplateRelevanceStatemenEntity> sysPdfTemplateRelevanceStatemenEntityList = sysPdfTemplateRelevanceStatemenDao.selectList(ew);
return sysPdfTemplateRelevanceStatemenEntityList;
}
@ -38,13 +38,13 @@ public class SystemPDFTemplateRelevanceStatemenServiceImpl implements SystemPDFT
@Override
public boolean udpateRl(SysPdfTemplateRelevanceStatemenEntity systemPDFTemplateRelevanceEntity) {
systemPDFTemplateRelevanceEntity.setUpdateTime(new Date());
int count = sysPdfTemplateRelevanceStatemenDao.updateById(systemPDFTemplateRelevanceEntity);
int count= sysPdfTemplateRelevanceStatemenDao.updateById(systemPDFTemplateRelevanceEntity);
if(count>0){
return true;
}else{
return false;
}
if (count > 0) {
return true;
} else {
return false;
}
}
}

@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -69,18 +70,18 @@ public class SystemParamConfigServiceImpl implements SystemParamConfigService {
@Override
public boolean updateById(SysParamConfigSaveRequest sysParamConfigSaveRequest) {
sysParamConfigSaveRequest.setUpdateTime(new Date());
return systemParamConfigDao.updateById(sysParamConfigSaveRequest);
}
@Override
public boolean updateParentId(SysParamConfigSaveRequest sysParamConfigSaveRequest) {
return systemParamConfigDao.updateParentId(sysParamConfigSaveRequest);
}
@Override
public boolean insert(SystemParamConfigEntity systemParamConfigEntity) {
systemParamConfigEntity.setUpdateTime(new Date());
return systemParamConfigDao.insert(systemParamConfigEntity);
}

@ -13,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@Service
@ -79,6 +80,7 @@ public class ThrInvWarehouseServiceImpl implements ThrInvWarehouseService {
@Override
public boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity) {
thrInvWarehouseEntity.setUpdateTime(new Date());
return thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity);
}
@ -89,6 +91,7 @@ public class ThrInvWarehouseServiceImpl implements ThrInvWarehouseService {
@Override
public boolean updateThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity) {
thrInvWarehouseEntity.setUpdateTime(new Date());
return thrInvWarehouseDao.updateThrInvWarehouse(thrInvWarehouseEntity);
}

@ -30,4 +30,71 @@
</if>
</where>
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicBusTypeChangeEntity" useGeneratedKeys="true">
insert into basic_bustype_change
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
originAction,
originName,
targetAction,
`type`,
`enable`,
`createUser`,
updateUser,
createTime,
updateTime,
remark,
auditStatus,
busAuditStatus,
targetBusAction,
beforeTime,
busBeforeTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{originAction,jdbcType=VARCHAR},
#{originName,jdbcType=VARCHAR},
#{targetAction,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT},
#{enable,jdbcType=TINYINT},
#{createUser,jdbcType=VARCHAR},
#{updateUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR},
#{auditStatus,jdbcType=TINYINT},
#{busAuditStatus,jdbcType=TINYINT},
#{targetBusAction,jdbcType=VARCHAR},
#{beforeTime,jdbcType=TINYINT},
#{busBeforeTime,jdbcType=TINYINT},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
originAction = #{originAction,jdbcType=VARCHAR},
originName = #{originName,jdbcType=VARCHAR},
targetAction = #{targetAction,jdbcType=VARCHAR},
`type` = #{type,jdbcType=TINYINT},
`enable` = #{enable,jdbcType=TINYINT},
`createUser` = #{createUser,jdbcType=VARCHAR},
updateUser = #{updateUser,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
auditStatus = #{auditStatus,jdbcType=TINYINT},
busAuditStatus = #{busAuditStatus,jdbcType=TINYINT},
targetBusAction = #{targetBusAction,jdbcType=VARCHAR},
beforeTime = #{beforeTime,jdbcType=TINYINT},
busBeforeTime = #{busBeforeTime,jdbcType=TINYINT},
</trim>
</insert>
</mapper>

@ -61,4 +61,89 @@
</if>
</where>
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicBusTypePreEntity" useGeneratedKeys="true">
insert into basic_bustype_pre
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
intro,
`action`,
`index`,
beforeTime,
changeType,
defaultDeptCode,
defaultInvCode,
deptCode,
invCode,
originAction,
changeEnable,
supplementAll,
`createUser`,
updateUser,
createTime,
updateTime,
remark,
targetBusAction,
busBeforeTime,
auditStatus,
busAuditStatus,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{intro,jdbcType=VARCHAR},
#{action,jdbcType=VARCHAR},
#{index,jdbcType=TINYINT},
#{beforeTime,jdbcType=INTEGER},
#{changeType,jdbcType=TINYINT},
#{defaultDeptCode,jdbcType=VARCHAR},
#{defaultInvCode,jdbcType=VARCHAR},
#{deptCode,jdbcType=VARCHAR},
#{invCode,jdbcType=VARCHAR},
#{originAction,jdbcType=VARCHAR},
#{changeEnable,jdbcType=TINYINT},
#{supplementAll,jdbcType=TINYINT},
#{createUser,jdbcType=VARCHAR},
#{updateUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR},
#{targetBusAction,jdbcType=VARCHAR},
#{busBeforeTime,jdbcType=TINYINT},
#{auditStatus,jdbcType=TINYINT},
#{busAuditStatus,jdbcType=TINYINT},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
intro = #{intro,jdbcType=VARCHAR},
`action` = #{action,jdbcType=VARCHAR},
`index` = #{index,jdbcType=TINYINT},
beforeTime = #{beforeTime,jdbcType=INTEGER},
changeType = #{changeType,jdbcType=TINYINT},
defaultDeptCode = #{defaultDeptCode,jdbcType=VARCHAR},
defaultInvCode = #{defaultInvCode,jdbcType=VARCHAR},
deptCode = #{deptCode,jdbcType=VARCHAR},
invCode = #{invCode,jdbcType=VARCHAR},
originAction = #{originAction,jdbcType=VARCHAR},
changeEnable = #{changeEnable,jdbcType=TINYINT},
supplementAll = #{supplementAll,jdbcType=TINYINT},
`createUser` = #{createUser,jdbcType=VARCHAR},
updateUser = #{updateUser,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
targetBusAction = #{targetBusAction,jdbcType=VARCHAR},
busBeforeTime = #{busBeforeTime,jdbcType=TINYINT},
auditStatus = #{auditStatus,jdbcType=TINYINT},
busAuditStatus = #{busAuditStatus,jdbcType=TINYINT},
</trim>
</insert>
</mapper>

@ -70,7 +70,7 @@
vailGroupBuy, busType, inStock, actionType, thrCheckEnable, thrCheckWebNew,
thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp,
thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel, checkVailDate,
checkExpire, checkCertExpire,preInBackAction)
checkExpire, checkCertExpire,preInBackAction, backPreinType)
values (#{mainAction}, #{action}, #{name}, #{enable}, #{remark}, #{thirdSysFk}, #{genUnit}, #{innerOrder},
#{secCheckEnable}, #{checkEnable}, #{checkUdims}, #{checkPdaEd}, #{checkPdaUn}, #{checkPc},
#{checkWebNew}, #{checkSp}, #{checkChange}, #{secCheckUdims}, #{secCheckPdaEd}, #{secCheckPdaUn},
@ -82,7 +82,7 @@
#{vailGroupBuy}, #{busType}, #{inStock}, #{actionType}, #{thrCheckEnable}, #{thrCheckWebNew},
#{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims}, #{thrCheckPc}, #{thrCheckSp},
#{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}, #{checkVailDate},
#{checkExpire}, #{checkCertExpire},#{preInBackAction})
#{checkExpire}, #{checkCertExpire},#{preInBackAction},#{backPreinType})
</insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">

@ -162,4 +162,62 @@
DELETE
FROM basic_entrust_accept
</delete>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.basic.EntrustReceEntity" useGeneratedKeys="true">
insert into basic_entrust_accept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`action`,
curDept,
curInv,
userId,
entrustDept,
entrustInv,
entrustAction,
entrustUser,
finishRece,
updateTime,
remark,
entrustEnd,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{action,jdbcType=VARCHAR},
#{curDept,jdbcType=VARCHAR},
#{curInv,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR},
#{entrustDept,jdbcType=VARCHAR},
#{entrustInv,jdbcType=VARCHAR},
#{entrustAction,jdbcType=VARCHAR},
#{entrustUser,jdbcType=VARCHAR},
#{finishRece,jdbcType=TINYINT},
#{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR},
#{entrustEnd,jdbcType=TINYINT},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`action` = #{action,jdbcType=VARCHAR},
curDept = #{curDept,jdbcType=VARCHAR},
curInv = #{curInv,jdbcType=VARCHAR},
userId = #{userId,jdbcType=VARCHAR},
entrustDept = #{entrustDept,jdbcType=VARCHAR},
entrustInv = #{entrustInv,jdbcType=VARCHAR},
entrustAction = #{entrustAction,jdbcType=VARCHAR},
entrustUser = #{entrustUser,jdbcType=VARCHAR},
finishRece = #{finishRece,jdbcType=TINYINT},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
entrustEnd = #{entrustEnd,jdbcType=TINYINT},
</trim>
</insert>
</mapper>

@ -13,4 +13,13 @@
)
</insert>
<select id="selectOrderInvoice" parameterType="com.glxp.api.entity.inout.IoOrderInvoiceEntity" resultType="com.glxp.api.entity.inout.IoOrderInvoiceEntity" >
select * from io_order_invoice
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
</where>
</select>
</mapper>

@ -52,6 +52,7 @@
<if test="paramStatus != null">paramStatus=#{paramStatus},</if>
<if test="paramType != null">paramType=#{paramType},</if>
<if test="paramExplain != null">paramExplain=#{paramExplain},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
</set>
WHERE id=#{id}
</update>
@ -66,16 +67,63 @@
<insert id="insert" parameterType="com.glxp.api.entity.system.SystemParamConfigEntity">
insert INTO sys_param_config(paramName,
paramKey, paramValue, paramStatus, paramType, paramExplain)
paramKey, paramValue, paramStatus, paramType, paramExplain, updateTime)
values (#{paramName},
#{paramKey},
#{paramValue},
#{paramStatus},
#{paramType},
#{paramExplain})
#{paramExplain},
#{updateTime}
)
</insert>
<select id="selectValueByParamKey" resultType="java.lang.String">
select paramValue from sys_param_config where paramKey = #{key}
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.system.SystemParamConfigEntity" useGeneratedKeys="true">
insert into sys_param_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
parentId,
paramName,
paramKey,
paramValue,
paramStatus,
paramType,
paramExplain,
updateTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{parentId,jdbcType=INTEGER},
#{paramName,jdbcType=VARCHAR},
#{paramKey,jdbcType=VARCHAR},
#{paramValue,jdbcType=VARCHAR},
#{paramStatus,jdbcType=INTEGER},
#{paramType,jdbcType=INTEGER},
#{paramExplain,jdbcType=VARCHAR},
#{updateTime,jdbcType=DATE},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
parentId = #{parentId,jdbcType=INTEGER},
paramName = #{paramName,jdbcType=VARCHAR},
paramKey = #{paramKey,jdbcType=VARCHAR},
paramValue = #{paramValue,jdbcType=VARCHAR},
paramStatus = #{paramStatus,jdbcType=INTEGER},
paramType = #{paramType,jdbcType=INTEGER},
paramExplain = #{paramExplain,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=DATE},
</trim>
</insert>
</mapper>

@ -1,78 +1,139 @@
<?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.system.SysPdfTemplateRelevanceBizDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_biz-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="templateId" jdbcType="INTEGER" property="templateId" />
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="adminId" jdbcType="INTEGER" property="adminId" />
<result column="moduleId" jdbcType="INTEGER" property="moduleId" />
<result column="localAction" jdbcType="VARCHAR" property="localAction" />
<result column="remark1" jdbcType="VARCHAR" property="remark1" />
<result column="remark2" jdbcType="VARCHAR" property="remark2" />
<result column="remark3" jdbcType="VARCHAR" property="remark3" />
<result column="printType" jdbcType="TINYINT" property="printType" />
<result column="modelKey" jdbcType="VARCHAR" property="modelKey" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey
</sql>
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_biz-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="templateId" jdbcType="INTEGER" property="templateId"/>
<result column="customerId" jdbcType="BIGINT" property="customerId"/>
<result column="adminId" jdbcType="INTEGER" property="adminId"/>
<result column="moduleId" jdbcType="INTEGER" property="moduleId"/>
<result column="localAction" jdbcType="VARCHAR" property="localAction"/>
<result column="remark1" jdbcType="VARCHAR" property="remark1"/>
<result column="remark2" jdbcType="VARCHAR" property="remark2"/>
<result column="remark3" jdbcType="VARCHAR" property="remark3"/>
<result column="printType" jdbcType="TINYINT" property="printType"/>
<result column="modelKey" jdbcType="VARCHAR" property="modelKey"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id,
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey
</sql>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT
basic_bustype_change.`originName` localActionName,
sys_pdf_template_relevance_biz.id,
basic_bustype_change.originAction localAction,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_biz.remark1,
sys_pdf_template_relevance_biz.remark2,
sys_pdf_template_relevance_biz.remark3,
printType
FROM
basic_bustype_change
LEFT JOIN sys_pdf_template_relevance_biz ON basic_bustype_change.originAction = sys_pdf_template_relevance_biz.localAction
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_biz.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_biz.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_biz.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_biz.`modelKey` = #{modelKey}
</if>
</where>
</select>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT basic_bustype_change.`originName` localActionName,
sys_pdf_template_relevance_biz.id,
basic_bustype_change.originAction localAction,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_biz.remark1,
sys_pdf_template_relevance_biz.remark2,
sys_pdf_template_relevance_biz.remark3,
printType
FROM basic_bustype_change
LEFT JOIN sys_pdf_template_relevance_biz
ON basic_bustype_change.originAction = sys_pdf_template_relevance_biz.localAction
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_biz.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_biz.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_biz.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_biz.`modelKey` = #{modelKey}
</if>
</where>
</select>
<insert id="upInsert" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity">
insert
ignore
<insert id="upInsert" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity">
insert
ignore
INTO sys_pdf_template_relevance_biz
(templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3, printType,modelKey)
(templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3, printType, modelKey, updateTime)
values (#{templateId},
#{customerId},
#{adminId},
#{moduleId},
#{localAction},
#{remark1},
#{remark2},
#{remark3},
#{printType},
#{modelKey}
)
</insert>
#{customerId},
#{adminId},
#{moduleId},
#{localAction},
#{remark1},
#{remark2},
#{remark3},
#{printType},
#{modelKey},
#{updateTime})
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity" useGeneratedKeys="true">
insert into sys_pdf_template_relevance_biz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey,
updateTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{templateId,jdbcType=INTEGER},
#{customerId,jdbcType=BIGINT},
#{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER},
#{localAction,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR},
#{updateTime, jdbcType=DATE},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=DATE},
</trim>
</insert>
</mapper>

@ -1,89 +1,151 @@
<?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.system.SysPdfTemplateRelevanceCodeDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_code-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="templateId" jdbcType="INTEGER" property="templateId" />
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="adminId" jdbcType="INTEGER" property="adminId" />
<result column="moduleId" jdbcType="INTEGER" property="moduleId" />
<result column="localAction" jdbcType="VARCHAR" property="localAction" />
<result column="remark1" jdbcType="VARCHAR" property="remark1" />
<result column="remark2" jdbcType="VARCHAR" property="remark2" />
<result column="remark3" jdbcType="VARCHAR" property="remark3" />
<result column="printType" jdbcType="TINYINT" property="printType" />
<result column="modelKey" jdbcType="VARCHAR" property="modelKey" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey
</sql>
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_code-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="templateId" jdbcType="INTEGER" property="templateId"/>
<result column="customerId" jdbcType="BIGINT" property="customerId"/>
<result column="adminId" jdbcType="INTEGER" property="adminId"/>
<result column="moduleId" jdbcType="INTEGER" property="moduleId"/>
<result column="localAction" jdbcType="VARCHAR" property="localAction"/>
<result column="remark1" jdbcType="VARCHAR" property="remark1"/>
<result column="remark2" jdbcType="VARCHAR" property="remark2"/>
<result column="remark3" jdbcType="VARCHAR" property="remark3"/>
<result column="printType" jdbcType="TINYINT" property="printType"/>
<result column="modelKey" jdbcType="VARCHAR" property="modelKey"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id,
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey
</sql>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
select basic_bussiness_type.`name` localActionName,
sys_pdf_template_relevance_code.id,
basic_bussiness_type.action localAction,
templateId,
moduleId,
sys_pdf_template.name templateName,
sys_pdf_template_relevance_code.remark1,
sys_pdf_template_relevance_code.remark2,
sys_pdf_template_relevance_code.remark3,
printType
from basic_bussiness_type
LEFT JOIN sys_pdf_template_relevance_code on basic_bussiness_type.action = sys_pdf_template_relevance_code.localAction
LEFT JOIN sys_pdf_template on sys_pdf_template_relevance_code.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_code.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_code.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_code.`modelKey` = #{modelKey}
</if>
</where>
</select>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
select basic_bussiness_type.`name` localActionName,
sys_pdf_template_relevance_code.id,
basic_bussiness_type.action localAction,
templateId,
moduleId,
sys_pdf_template.name templateName,
sys_pdf_template_relevance_code.remark1,
sys_pdf_template_relevance_code.remark2,
sys_pdf_template_relevance_code.remark3,
printType
from basic_bussiness_type
LEFT JOIN sys_pdf_template_relevance_code
on basic_bussiness_type.action = sys_pdf_template_relevance_code.localAction
LEFT JOIN sys_pdf_template on sys_pdf_template_relevance_code.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_code.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_code.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_code.`modelKey` = #{modelKey}
</if>
</where>
</select>
<insert id="upInsert" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
insert
ignore
<insert id="upInsert" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
insert
ignore
INTO sys_pdf_template_relevance_code
(templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3, printType,modelKey)
(templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3, printType, modelKey)
values (#{templateId},
#{customerId},
#{adminId},
#{moduleId},
#{localAction},
#{remark1},
#{remark2},
#{remark3},
#{printType},
#{modelKey}
)
</insert>
<select id="selectNameAndAction" resultType="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
SELECT *
FROM sys_pdf_template_relevance_code
<where>
<if test="name != null">
AND `modelKey` = #{name}
</if>
<if test="localAction != null">
AND `localAction` = #{localAction}
</if>
</where>
</select>
#{customerId},
#{adminId},
#{moduleId},
#{localAction},
#{remark1},
#{remark2},
#{remark3},
#{printType},
#{modelKey})
</insert>
<select id="selectNameAndAction" resultType="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity">
SELECT *
FROM sys_pdf_template_relevance_code
<where>
<if test="name != null">
AND `modelKey` = #{name}
</if>
<if test="localAction != null">
AND `localAction` = #{localAction}
</if>
</where>
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity" useGeneratedKeys="true">
insert into sys_pdf_template_relevance_code
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey,
updateTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{templateId,jdbcType=INTEGER},
#{customerId,jdbcType=BIGINT},
#{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER},
#{localAction,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR},
#{updateTime,jdbcType=DATE},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=DATE},
</trim>
</insert>
</mapper>

@ -1,56 +1,117 @@
<?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.system.SysPdfTemplateRelevanceLabelDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_label-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="templateId" jdbcType="INTEGER" property="templateId" />
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="adminId" jdbcType="INTEGER" property="adminId" />
<result column="moduleId" jdbcType="INTEGER" property="moduleId" />
<result column="localAction" jdbcType="VARCHAR" property="localAction" />
<result column="remark1" jdbcType="VARCHAR" property="remark1" />
<result column="remark2" jdbcType="VARCHAR" property="remark2" />
<result column="remark3" jdbcType="VARCHAR" property="remark3" />
<result column="printType" jdbcType="TINYINT" property="printType" />
<result column="modelKey" jdbcType="VARCHAR" property="modelKey" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey
</sql>
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_label-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="templateId" jdbcType="INTEGER" property="templateId"/>
<result column="customerId" jdbcType="BIGINT" property="customerId"/>
<result column="adminId" jdbcType="INTEGER" property="adminId"/>
<result column="moduleId" jdbcType="INTEGER" property="moduleId"/>
<result column="localAction" jdbcType="VARCHAR" property="localAction"/>
<result column="remark1" jdbcType="VARCHAR" property="remark1"/>
<result column="remark2" jdbcType="VARCHAR" property="remark2"/>
<result column="remark3" jdbcType="VARCHAR" property="remark3"/>
<result column="printType" jdbcType="TINYINT" property="printType"/>
<result column="modelKey" jdbcType="VARCHAR" property="modelKey"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id,
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey
</sql>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT
sys_pdf_template_relevance_label.id,
sys_pdf_template_relevance_label.localAction localActionName,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_label.remark1,
sys_pdf_template_relevance_label.remark2,
sys_pdf_template_relevance_label.remark3,
printType
FROM
sys_pdf_template_relevance_label
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_label.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_label.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_label.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_label.`modelKey` = #{modelKey}
</if>
</where>
</select>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT sys_pdf_template_relevance_label.id,
sys_pdf_template_relevance_label.localAction localActionName,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_label.remark1,
sys_pdf_template_relevance_label.remark2,
sys_pdf_template_relevance_label.remark3,
printType
FROM sys_pdf_template_relevance_label
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_label.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_label.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_label.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_label.`modelKey` = #{modelKey}
</if>
</where>
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity" useGeneratedKeys="true">
insert into sys_pdf_template_relevance_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey,
updateTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{templateId,jdbcType=INTEGER},
#{customerId,jdbcType=BIGINT},
#{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER},
#{localAction,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR},
#{updateTime, jdbcType=DATE},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=DATE},
</trim>
</insert>
</mapper>

@ -1,57 +1,115 @@
<?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.system.SysPdfTemplateRelevanceStatemenDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_statemen-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="templateId" jdbcType="INTEGER" property="templateId" />
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="adminId" jdbcType="INTEGER" property="adminId" />
<result column="moduleId" jdbcType="INTEGER" property="moduleId" />
<result column="localAction" jdbcType="VARCHAR" property="localAction" />
<result column="remark1" jdbcType="VARCHAR" property="remark1" />
<result column="remark2" jdbcType="VARCHAR" property="remark2" />
<result column="remark3" jdbcType="VARCHAR" property="remark3" />
<result column="printType" jdbcType="TINYINT" property="printType" />
<result column="modelKey" jdbcType="VARCHAR" property="modelKey" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey
</sql>
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_statemen-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="templateId" jdbcType="INTEGER" property="templateId"/>
<result column="customerId" jdbcType="BIGINT" property="customerId"/>
<result column="adminId" jdbcType="INTEGER" property="adminId"/>
<result column="moduleId" jdbcType="INTEGER" property="moduleId"/>
<result column="localAction" jdbcType="VARCHAR" property="localAction"/>
<result column="remark1" jdbcType="VARCHAR" property="remark1"/>
<result column="remark2" jdbcType="VARCHAR" property="remark2"/>
<result column="remark3" jdbcType="VARCHAR" property="remark3"/>
<result column="printType" jdbcType="TINYINT" property="printType"/>
<result column="modelKey" jdbcType="VARCHAR" property="modelKey"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id,
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey
</sql>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT
sys_pdf_template_relevance_statemen.id,
sys_pdf_template_relevance_statemen.localAction localActionName,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_statemen.remark1,
sys_pdf_template_relevance_statemen.remark2,
sys_pdf_template_relevance_statemen.remark3,
printType
FROM
sys_pdf_template_relevance_statemen
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_statemen.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_statemen.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_statemen.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_statemen.`modelKey` = #{modelKey}
</if>
</where>
</select>
<select id="filterList" parameterType="com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest"
resultType="com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse">
SELECT sys_pdf_template_relevance_statemen.id,
sys_pdf_template_relevance_statemen.localAction localActionName,
templateId,
moduleId,
sys_pdf_template.NAME templateName,
sys_pdf_template_relevance_statemen.remark1,
sys_pdf_template_relevance_statemen.remark2,
sys_pdf_template_relevance_statemen.remark3,
printType
FROM sys_pdf_template_relevance_statemen
LEFT JOIN sys_pdf_template ON sys_pdf_template_relevance_statemen.templateId = sys_pdf_template.id
<where>
<if test="moduleId != null">
AND `moduleId` = #{moduleId}
</if>
<if test="localAction != null">
AND sys_pdf_template_relevance_statemen.`localAction` = #{localAction}
</if>
<if test="templateType != null">
AND sys_pdf_template_relevance_statemen.`templateType` = #{templateType}
</if>
<if test="modelKey != null">
AND sys_pdf_template_relevance_statemen.`modelKey` = #{modelKey}
</if>
</where>
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity" useGeneratedKeys="true">
insert into sys_pdf_template_relevance_statemen
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{templateId,jdbcType=INTEGER},
#{customerId,jdbcType=BIGINT},
#{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER},
#{localAction,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -2,24 +2,35 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.system.SystemPDFModuleDao">
<select id="queryPage" parameterType="com.glxp.api.req.system.FilterPdfModuleRequest"
resultType="com.glxp.api.entity.system.SystemPDFModuleEntity">
SELECT id,name,param,fieldExplain,remark,templateId,create_time,update_time,templateDlUrl,templateType
,remark1,remark2,remark3,modelKey
SELECT id
, name
, param
, fieldExplain
, remark
, templateId
, create_time
, update_time
, templateDlUrl
, templateType
, remark1
, remark2
, remark3
, modelKey
FROM sys_pdf_module
<where>
<if test="templateId != null and '' != templateId">
AND `templateId` LIKE CONCAT(#{templateId},'%')
AND `templateId` LIKE CONCAT(#{templateId}, '%')
</if>
<if test="modelKey != null and '' != modelKey">
AND `modelKey` LIKE CONCAT(#{modelKey},'%')
AND `modelKey` LIKE CONCAT(#{modelKey}, '%')
</if>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT('%',#{name},'%')
AND `name` LIKE CONCAT('%', #{name}, '%')
</if>
<if test="templateType != null">
AND templateType=#{templateType}
AND templateType = #{templateType}
</if>
</where>
</select>
@ -46,32 +57,53 @@
</select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFModuleEntity">
UPDATE sys_pdf_module
<set>
<if test="name != null">name=#{name},</if>
<if test="param != null">param=#{param},</if>
<if test="fieldExplain != null">fieldExplain=#{fieldExplain},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="templateId != null">templateId=#{templateId},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
<if test="templateDlUrl != null">templateDlUrl=#{templateDlUrl},</if>
<if test="templateType != null">templateType=#{templateType},</if>
<if test="remark1 != null">remark1=#{remark1},</if>
<if test="remark2 != null">remark2=#{remark2},</if>
<if test="remark3 != null">remark3=#{remark3},</if>
<if test="name != null">
name=#{name},
</if>
<if test="param != null">
param=#{param},
</if>
<if test="fieldExplain != null">
fieldExplain=#{fieldExplain},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="templateId != null">
templateId=#{templateId},
</if>
<if test="create_time != null">
create_time=#{create_time},
</if>
<if test="update_time != null">
update_time=#{update_time},
</if>
<if test="templateDlUrl != null">
templateDlUrl=#{templateDlUrl},
</if>
<if test="templateType != null">
templateType=#{templateType},
</if>
<if test="remark1 != null">
remark1=#{remark1},
</if>
<if test="remark2 != null">
remark2=#{remark2},
</if>
<if test="remark3 != null">
remark3=#{remark3},
</if>
</set>
WHERE id=#{id}
WHERE id = #{id}
</update>
<insert id="insert" parameterType="com.glxp.api.entity.system.SystemPDFModuleEntity">
insert INTO sys_pdf_module( name, param, fieldExplain, remark, templateId, create_time, update_time
, templateDlUrl, templateType
, remark1, remark2, remark3)
, templateDlUrl, templateType
, remark1, remark2, remark3)
values (#{name},
#{param},
#{fieldExplain},
@ -92,4 +124,65 @@
from sys_pdf_module
where id = #{id}
</delete>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SystemPDFModuleEntity" useGeneratedKeys="true">
insert into sys_pdf_module
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`name`,
param,
fieldExplain,
remark,
templateId,
create_time,
update_time,
templateDlUrl,
templateType,
remark1,
remark2,
remark3,
modelKey,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{name,jdbcType=VARCHAR},
#{param,jdbcType=VARCHAR},
#{fieldExplain,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{templateId,jdbcType=INTEGER},
#{create_time,jdbcType=TIMESTAMP},
#{update_time,jdbcType=TIMESTAMP},
#{templateDlUrl,jdbcType=VARCHAR},
#{templateType,jdbcType=INTEGER},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{modelKey,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`name` = #{name,jdbcType=VARCHAR},
param = #{param,jdbcType=VARCHAR},
fieldExplain = #{fieldExplain,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
templateId = #{templateId,jdbcType=INTEGER},
create_time = #{create_time,jdbcType=TIMESTAMP},
update_time = #{update_time,jdbcType=TIMESTAMP},
templateDlUrl = #{templateDlUrl,jdbcType=VARCHAR},
templateType = #{templateType,jdbcType=INTEGER},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
modelKey = #{modelKey,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -2,16 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.system.SystemPDFTemplateDao">
<select id="queryPage" parameterType="com.glxp.api.req.system.FilterPdfTemplateRequest"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
SELECT id,name,type,module,param,path,rowCount,qrcodeCount,remark,create_time,update_time as update_time,jrxmlPath,bussinessType,bussinessStatus
SELECT id,
name,
type,
module,
param,
path,
rowCount,
qrcodeCount,
remark,
create_time,
update_time as update_time,
jrxmlPath,
bussinessType,
bussinessStatus
FROM sys_pdf_template
<where>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT('%',#{name},'%')
AND `name` LIKE CONCAT('%', #{name}, '%')
</if>
<if test="module != null ">
<if test="module != null">
AND `module` = #{module}
</if>
</where>
@ -35,28 +47,53 @@
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
UPDATE sys_pdf_template
<set>
<if test="name != null">name=#{name},</if>
<if test="type != null">type=#{type},</if>
<if test="module != null">module=#{module},</if>
<if test="param != null">param=#{param},</if>
<if test="path != null">path=#{path},</if>
<if test="rowCount != null">rowCount=#{rowCount},</if>
<if test="qrcodeCount != null">qrcodeCount=#{qrcodeCount},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
<if test="jrxmlPath != null">jrxmlPath=#{jrxmlPath},</if>
<if test="bussinessType != null">bussinessType=#{bussinessType},</if>
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>
<if test="name != null">
name=#{name},
</if>
<if test="type != null">
type=#{type},
</if>
<if test="module != null">
module=#{module},
</if>
<if test="param != null">
param=#{param},
</if>
<if test="path != null">
path=#{path},
</if>
<if test="rowCount != null">
rowCount=#{rowCount},
</if>
<if test="qrcodeCount != null">
qrcodeCount=#{qrcodeCount},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="create_time != null">
create_time=#{create_time},
</if>
<if test="update_time != null">
update_time=#{update_time},
</if>
<if test="jrxmlPath != null">
jrxmlPath=#{jrxmlPath},
</if>
<if test="bussinessType != null">
bussinessType=#{bussinessType},
</if>
<if test="bussinessStatus != null">
bussinessStatus=#{bussinessStatus},
</if>
</set>
WHERE id=#{id}
WHERE id = #{id}
</update>
<insert id="insert" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
insert INTO sys_pdf_template(name,
type, module, param, path, rowCount, qrcodeCount, remark, create_time,
update_time, jrxmlPath,bussinessType,bussinessStatus)
type, module, param, path, rowCount, qrcodeCount, remark, create_time,
update_time, jrxmlPath, bussinessType, bussinessStatus)
values (#{name},
#{type},
#{module},
@ -66,7 +103,7 @@
#{qrcodeCount},
#{remark},
#{create_time},
#{update_time}, #{jrxmlPath},#{bussinessType},#{bussinessStatus})
#{update_time}, #{jrxmlPath}, #{bussinessType}, #{bussinessStatus})
</insert>
<select id="listPDFTemplates" parameterType="java.lang.Integer"
@ -80,4 +117,65 @@
from sys_pdf_template
where id = #{id}
</delete>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity" useGeneratedKeys="true">
insert into sys_pdf_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`name`,
`type`,
`module`,
param,
`path`,
`rowCount`,
qrcodeCount,
remark,
create_time,
update_time,
jrxmlPath,
bussinessType,
bussinessStatus,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{name,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{module,jdbcType=INTEGER},
#{param,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR},
#{rowCount,jdbcType=INTEGER},
#{qrcodeCount,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR},
#{create_time,jdbcType=TIMESTAMP},
#{update_time,jdbcType=TIMESTAMP},
#{jrxmlPath,jdbcType=VARCHAR},
#{bussinessType,jdbcType=VARCHAR},
#{bussinessStatus,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`module` = #{module,jdbcType=INTEGER},
param = #{param,jdbcType=VARCHAR},
`path` = #{path,jdbcType=VARCHAR},
`rowCount` = #{rowCount,jdbcType=INTEGER},
qrcodeCount = #{qrcodeCount,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{create_time,jdbcType=TIMESTAMP},
update_time = #{update_time,jdbcType=TIMESTAMP},
jrxmlPath = #{jrxmlPath,jdbcType=VARCHAR},
bussinessType = #{bussinessType,jdbcType=VARCHAR},
bussinessStatus = #{bussinessStatus,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -2,22 +2,24 @@
<!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.ThrCorpDao">
<select id="filterThrCorps" parameterType="com.glxp.api.req.thrsys.FilterThrCorpRequest"
resultType="com.glxp.api.res.thrsys.ThrCorpsResponse">
SELECT * FROM thr_corp
SELECT *
FROM thr_corp
<where>
<if test="unitId != '' and unitId != null">
AND unitId like concat('%',#{unitId},'%')
AND unitId like concat('%', #{unitId}, '%')
</if>
<if test="name != '' and name != null">
AND ( name LIKE concat('%',#{name},'%') or spell LIKE concat('%',#{name},'%') )
AND (name LIKE concat('%', #{name}, '%') or spell LIKE concat('%', #{name}, '%'))
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
ORDER BY updateTime DESC
@ -26,54 +28,45 @@
<insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
replace
INTO thr_corp
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime,createUser,createTime,updateUser,remark
)
values
(
#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{createUser},
#{createTime},
#{updateUser},
#{remark}
)
INTO thr_corp
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, createUser, createTime, updateUser, remark)
values (#{unitId},
#{name},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{updateTime},
#{createUser},
#{createTime},
#{updateUser},
#{remark})
</insert>
<insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_corp
(
unitId,name,spell,addr,creditNo,
contact,mobile,thirdSysFk,updateTime,createUser,createTime,updateUser,remark
)
(unitId, name, spell, addr, creditNo,
contact, mobile, thirdSysFk, updateTime, createUser, createTime, updateUser, remark)
values
<foreach collection="thrCorpEntitys" item="item" index="index"
separator=",">
(
#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk},
#{item.updateTime},
#{item.createUser},
#{item.createTime},
#{item.updateUser},
#{item.remark}
)
(#{item.unitId},
#{item.name},
#{item.spell},
#{item.addr},
#{item.creditNo},
#{item.contact},
#{item.mobile},
#{item.thirdSysFk},
#{item.updateTime},
#{item.createUser},
#{item.createTime},
#{item.updateUser},
#{item.remark})
</foreach>
</insert>
@ -96,47 +89,73 @@
<update id="updateThrCorps" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
UPDATE thr_corp
<trim prefix="set" suffixOverrides=",">
<if test="unitId != null">unitId=#{unitId},</if>
<if test="name != null">name=#{name},</if>
<if test="spell != null">spell=#{spell},</if>
<if test="addr != null">addr=#{addr},</if>
<if test="creditNo != null">creditNo=#{creditNo},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="mobile != null">mobile=#{mobile},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="createUser != null">createUser=#{createUser},</if>
<if test="createTime != null">createTime=#{createTime},</if>
<if test="updateUser != null">updateUser=#{updateUser},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="unitId != null">
unitId=#{unitId},
</if>
<if test="name != null">
name=#{name},
</if>
<if test="spell != null">
spell=#{spell},
</if>
<if test="addr != null">
addr=#{addr},
</if>
<if test="creditNo != null">
creditNo=#{creditNo},
</if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="mobile != null">
mobile=#{mobile},
</if>
<if test="thirdSysFk != null">
thirdSysFk=#{thirdSysFk},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="createUser != null">
createUser=#{createUser},
</if>
<if test="createTime != null">
createTime=#{createTime},
</if>
<if test="updateUser != null">
updateUser=#{updateUser},
</if>
<if test="remark != null">
remark=#{remark},
</if>
</trim>
WHERE id = #{id}
</update>
<insert id="importThrCorp" parameterType="com.glxp.api.entity.thrsys.ThrCorpEntity">
replace
into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime,createUser,createTime,updateUser,remark)
values (
#{unitId},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{name},
#{updateTime},
#{item.createUser},
#{item.createTime},
#{item.updateUser},
#{item.remark}
into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime, createUser,
createTime, updateUser, remark)
values (#{unitId},
#{spell},
#{addr},
#{creditNo},
#{contact},
#{mobile},
#{thirdSysFk},
#{name},
#{updateTime},
#{createUser},
#{createTime},
#{updateUser},
#{remark}
)
</insert>
<select id="selectByThirdId" parameterType="com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest"
resultType="com.glxp.api.res.thrsys.ThrUnitMaintainResponse">
select * FROM basic_corp
select *
FROM basic_corp
<where>
<if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId}
@ -171,4 +190,64 @@
and basic_third_sys.enabled = 1
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrSystemDetailEntity"
useGeneratedKeys="true">
insert into thr_corp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
unitId,
spell,
addr,
creditNo,
contact,
mobile,
thirdSysFk,
`name`,
`createUser`,
createTime,
updateUser,
updateTime,
remark,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{unitId,jdbcType=VARCHAR},
#{spell,jdbcType=VARCHAR},
#{addr,jdbcType=VARCHAR},
#{creditNo,jdbcType=VARCHAR},
#{contact,jdbcType=VARCHAR},
#{mobile,jdbcType=VARCHAR},
#{thirdSysFk,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateUser,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
unitId = #{unitId,jdbcType=VARCHAR},
spell = #{spell,jdbcType=VARCHAR},
addr = #{addr,jdbcType=VARCHAR},
creditNo = #{creditNo,jdbcType=VARCHAR},
contact = #{contact,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR},
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
`createUser` = #{createUser,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateUser = #{updateUser,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -5,7 +5,7 @@
resultType="com.glxp.api.entity.thrsys.ThrDeptEntity">
SELECT *
FROM thr_dept thrInv
left join thr_system thrSys on thrInv.thirdSysFk = thrSys.thirdId
left join thr_system thrSys on thrInv.thirdSysFk = thrSys.thirdId
<where>
thrSys.enabled = true
<if test="id != '' and id != null">
@ -28,7 +28,7 @@
</if>
<if test="key != null">
and (code like concat('%', #{key}, '%')
or `name` like concat('%', #{key}, '%'))
or `name` like concat('%', #{key}, '%'))
</if>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
@ -53,7 +53,8 @@
<select id="filterThrGroupInvWarehouse" parameterType="com.glxp.api.req.thrsys.FilterThrDeptRequest"
resultType="com.glxp.api.entity.thrsys.ThrDeptEntity">
SELECT * FROM thr_dept
SELECT *
FROM thr_dept
<where>
<if test="id != '' and id != null">
AND id = #{id}
@ -77,39 +78,35 @@
AND thirdSysFk = #{thirdSysFk}
</if>
</where>
</select>
<insert id="insertThrInvWarehouse" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
replace
INTO thr_dept
INTO thr_dept
(pid, code, name, advanceType, isDefault,
status, updateTime, remark, thirdSysFk)
values (
#{pid},
#{code},
#{name},
#{advanceType},
#{isDefault},
#{status},
#{updateTime},
#{remark},
#{thirdSysFk}
)
values (#{pid},
#{code},
#{name},
#{advanceType},
#{isDefault},
#{status},
#{updateTime},
#{remark},
#{thirdSysFk})
</insert>
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
replace INTO thr_dept
(pid, code, name, advanceType, isDefault,
status, updateTime, remark, thirdSysFk)
status, updateTime, remark, thirdSysFk)
VALUES
<foreach collection="thrDeptEntities" item="item" index="index"
separator=",">
(
#{item.pid}, #{item.code},
#{item.name}, #{item.advanceType}, #{item.isDefault},
#{item.status}, #{item.updateTime},
#{item.remark}, #{item.thirdSysFk})
(#{item.pid}, #{item.code},
#{item.name}, #{item.advanceType}, #{item.isDefault},
#{item.status}, #{item.updateTime},
#{item.remark}, #{item.thirdSysFk})
</foreach>
</insert>
@ -122,15 +119,33 @@
<update id="updateThrInvWarehouse" parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
UPDATE thr_dept
<trim prefix="set" suffixOverrides=",">
<if test="pid != null">pid=#{pid},</if>
<if test="name != null">name=#{name},</if>
<if test="code != null">code=#{code},</if>
<if test="advanceType != null">advanceType=#{advanceType},</if>
<if test="isDefault != null">isDefault=#{isDefault},</if>
<if test="status != null">status=#{status},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="pid != null">
pid=#{pid},
</if>
<if test="name != null">
name=#{name},
</if>
<if test="code != null">
code=#{code},
</if>
<if test="advanceType != null">
advanceType=#{advanceType},
</if>
<if test="isDefault != null">
isDefault=#{isDefault},
</if>
<if test="status != null">
status=#{status},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="thirdSysFk != null">
thirdSysFk=#{thirdSysFk},
</if>
</trim>
WHERE id = #{id}
</update>
@ -138,11 +153,13 @@
<select id="selectByCode" resultType="com.glxp.api.entity.thrsys.ThrDeptEntity">
select *
from thr_dept
where code = #{code} and thirdSysFk = #{thirdSysFk}
where code = #{code}
and thirdSysFk = #{thirdSysFk}
</select>
<select id="selectMaxCode" resultType="com.glxp.api.entity.thrsys.ThrDeptEntity">
select max(code) as code from thr_dept
select max(code) as code
from thr_dept
<where>
<if test="id != '' and id != null">
AND id = #{id}
@ -156,7 +173,7 @@
<if test="name != '' and name != null">
AND name = #{name}
</if>
<if test=" advanceType != null">
<if test="advanceType != null">
AND advanceType = #{advanceType}
</if>
<if test="isDefault != null">
@ -175,21 +192,76 @@
</select>
<insert id="insertInvWarehouses">
replace into thr_dept (pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`,
pcode,
thirdSysFk)
pcode,
thirdSysFk)
values
<foreach collection="thrDeptEntities" index="index" item="item" separator=",">
(#{item.pid},
#{item.code},
#{item.name},
#{item.advanceType},
#{item.isDefault},
#{item.status},
#{item.updateTime},
#{item.remark},
#{item.level},
#{item.pcode},
#{item.thirdSysFk})
#{item.code},
#{item.name},
#{item.advanceType},
#{item.isDefault},
#{item.status},
#{item.updateTime},
#{item.remark},
#{item.level},
#{item.pcode},
#{item.thirdSysFk})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity"
useGeneratedKeys="true">
insert into thr_dept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
pId,
code,
`name`,
advanceType,
isDefault,
`status`,
updateTime,
remark,
`level`,
pcode,
thirdSysFk,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{pId,jdbcType=INTEGER},
#{code,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
#{advanceType,jdbcType=VARCHAR},
#{isDefault,jdbcType=TINYINT},
#{status,jdbcType=TINYINT},
#{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR},
#{level,jdbcType=TINYINT},
#{pcode,jdbcType=VARCHAR},
#{thirdSysFk,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
pId = #{pId,jdbcType=INTEGER},
code = #{code,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
advanceType = #{advanceType,jdbcType=VARCHAR},
isDefault = #{isDefault,jdbcType=TINYINT},
`status` = #{status,jdbcType=TINYINT},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
`level` = #{level,jdbcType=TINYINT},
pcode = #{pcode,jdbcType=VARCHAR},
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -122,5 +122,20 @@
WHERE id = #{id}
</update>
<insert id="insertOrUpdate" parameterType="com.glxp.api.entity.system.ThrInvWarehouseEntity">
insert into thr_inv_warehouse
(id, code, `name`, parentId, remark, thirdSysFk,updateTime)
values
(#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{thirdSysFk,jdbcType=VARCHAR}, #{updateTime})
on duplicate key update
id = #{id,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
parentId = #{parentId,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=DATE}
</insert>
</mapper>

@ -1,36 +1,37 @@
<?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.ThrProductsDao">
<select id="filterThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
SELECT * FROM thr_products
SELECT *
FROM thr_products
<where>
<if test="name != '' and name != null">
AND name LIKE concat('%',#{name},'%')
AND name LIKE concat('%', #{name}, '%')
</if>
<if test="code != '' and code != null">
AND code = #{code}
</if>
<if test="sptm != '' and sptm != null">
AND sptm LIKE concat('%',#{sptm},'%')
AND sptm LIKE concat('%', #{sptm}, '%')
</if>
<if test="ybbm != '' and ybbm != null">
AND ybbm LIKE concat('%',#{ybbm},'%')
AND ybbm LIKE concat('%', #{ybbm}, '%')
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo LIKE concat('%',#{registerNo},'%')
AND registerNo LIKE concat('%', #{registerNo}, '%')
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory LIKE concat('%',#{manufactory},'%')
AND manufactory LIKE concat('%', #{manufactory}, '%')
</if>
<if test="spec != '' and spec != null">
AND spec LIKE concat('%',#{spec},'%')
AND spec LIKE concat('%', #{spec}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
concat('%',#{unionCode},'%')
or code LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE
concat('%', #{unionCode}, '%')
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
@ -39,16 +40,19 @@
AND thirdSysFk = #{thirdSys}
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%',#{supName},'%')
AND supName LIKE concat('%', #{supName}, '%')
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
</select>
<select id="filterThrProducts1" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
SELECT * FROM thr_products
SELECT *
FROM thr_products
<where>
<if test="name != '' and name != null">
AND name = #{name}
@ -57,23 +61,25 @@
AND code = #{code}
</if>
<if test="sptm != '' and sptm != null">
AND sptm= #{sptm}
AND sptm = #{sptm}
</if>
<if test="ybbm != '' and ybbm != null">
AND ybbm = #{ybbm}
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo= #{registerNo}
AND registerNo = #{registerNo}
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory= #{manufactory}
AND manufactory = #{manufactory}
</if>
<if test="spec != '' and spec != null">
AND spec = #{spec}
</if>
<if test="unionCode != '' and unionCode != null">
or code LIKE = #{unionCode} or sptm = #{unionCode} or ybbm LIKE
= #{unionCode}
or code LIKE = #{unionCode}
or sptm = #{unionCode}
or ybbm LIKE
= #{unionCode}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
@ -84,8 +90,10 @@
<if test="supName != '' and supName != null">
AND supName LIKE = #{supName}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
</select>
@ -93,33 +101,36 @@
<select id="filterJoinThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.res.thrsys.ThrProductsResponse">
SELECT thr_products.*,thr_system.thirdName thirdSysName FROM thr_products
LEFT JOIN thr_system on thr_products.thirdSysFk = thr_system.thirdId
SELECT thr_products.*, thr_system.thirdName thirdSysName
FROM thr_products
LEFT JOIN thr_system on thr_products.thirdSysFk = thr_system.thirdId
<where>
<if test="name != '' and name != null">
AND name LIKE concat('%',#{name},'%')
AND name LIKE concat('%', #{name}, '%')
</if>
<if test="code != '' and code != null">
AND code LIKE concat('%',#{code},'%')
AND code LIKE concat('%', #{code}, '%')
</if>
<if test="sptm != '' and sptm != null">
AND sptm LIKE concat('%',#{sptm},'%')
AND sptm LIKE concat('%', #{sptm}, '%')
</if>
<if test="ybbm != '' and ybbm != null">
AND ybbm LIKE concat('%',#{ybbm},'%')
AND ybbm LIKE concat('%', #{ybbm}, '%')
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo LIKE concat('%',#{registerNo},'%')
AND registerNo LIKE concat('%', #{registerNo}, '%')
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory LIKE concat('%',#{manufactory},'%')
AND manufactory LIKE concat('%', #{manufactory}, '%')
</if>
<if test="spec != '' and spec != null">
AND spec LIKE concat('%',#{spec},'%')
AND spec LIKE concat('%', #{spec}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
concat('%',#{unionCode},'%')
or code LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE
concat('%', #{unionCode}, '%')
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
@ -128,10 +139,12 @@
AND thirdSysFk = #{thirdSys}
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%',#{supName},'%')
AND supName LIKE concat('%', #{supName}, '%')
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where>
</select>
@ -153,60 +166,60 @@
<insert id="insertThrProducts" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrProductsEntity">
replace
INTO thr_products
(code, `name`, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3,price,createUser,createTime,updateUser)
values (
#{code},
#{name},
#{measname},
#{spec},
#{registerNo},
#{manufactory},
#{cplb},
#{flbm},
#{qxlb},
#{ybbm},
#{sptm},
#{tyshxydm},
#{zczbhhzbapzbh},
#{ylqxzcrbarmc},
#{ylqxzcrbarywmc},
#{cpms},
#{thirdSysFk},
#{updateTime},
#{supName},
#{model},
#{standard},
#{qtbm},
#{zczyxqz},
#{remark},
#{remark1},
#{remark2},
#{remark3},
#{price},
#{createUser},
#{createTime},
#{updateUser}
)
INTO thr_products
(code, `name`, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3, price,
createUser, createTime, updateUser)
values (#{code},
#{name},
#{measname},
#{spec},
#{registerNo},
#{manufactory},
#{cplb},
#{flbm},
#{qxlb},
#{ybbm},
#{sptm},
#{tyshxydm},
#{zczbhhzbapzbh},
#{ylqxzcrbarmc},
#{ylqxzcrbarywmc},
#{cpms},
#{thirdSysFk},
#{updateTime},
#{supName},
#{model},
#{standard},
#{qtbm},
#{zczyxqz},
#{remark},
#{remark1},
#{remark2},
#{remark3},
#{price},
#{createUser},
#{createTime},
#{updateUser})
</insert>
<select id="selectThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
SELECT * FROM thr_products
SELECT *
FROM thr_products
<where>
<if test="name != '' and name != null">
AND name =#{name}
AND name = #{name}
</if>
<if test="code != '' and code != null">
AND code =#{code}
AND code = #{code}
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo=#{registerNo}
AND registerNo = #{registerNo}
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory=#{manufactory}
AND manufactory = #{manufactory}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
@ -215,4 +228,119 @@
ORDER BY updateTime DESC
</select>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.ThrProductsEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into thr_products
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
code,
`name`,
measname,
spec,
registerNo,
manufactory,
thirdSysFk,
cplb,
flbm,
qxlb,
ybbm,
sptm,
tyshxydm,
zczbhhzbapzbh,
ylqxzcrbarmc,
ylqxzcrbarywmc,
cpms,
updateTime,
supName,
model,
`standard`,
qtbm,
zczyxqz,
remark,
remark1,
remark2,
remark3,
price,
`createUser`,
createTime,
updateUser,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{code,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
#{measname,jdbcType=VARCHAR},
#{spec,jdbcType=VARCHAR},
#{registerNo,jdbcType=VARCHAR},
#{manufactory,jdbcType=VARCHAR},
#{thirdSysFk,jdbcType=VARCHAR},
#{cplb,jdbcType=VARCHAR},
#{flbm,jdbcType=VARCHAR},
#{qxlb,jdbcType=VARCHAR},
#{ybbm,jdbcType=VARCHAR},
#{sptm,jdbcType=VARCHAR},
#{tyshxydm,jdbcType=VARCHAR},
#{zczbhhzbapzbh,jdbcType=VARCHAR},
#{ylqxzcrbarmc,jdbcType=VARCHAR},
#{ylqxzcrbarywmc,jdbcType=VARCHAR},
#{cpms,jdbcType=LONGVARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{supName,jdbcType=VARCHAR},
#{model,jdbcType=VARCHAR},
#{standard,jdbcType=VARCHAR},
#{qtbm,jdbcType=VARCHAR},
#{zczyxqz,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{price,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateUser,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
code = #{code,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
measname = #{measname,jdbcType=VARCHAR},
spec = #{spec,jdbcType=VARCHAR},
registerNo = #{registerNo,jdbcType=VARCHAR},
manufactory = #{manufactory,jdbcType=VARCHAR},
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
cplb = #{cplb,jdbcType=VARCHAR},
flbm = #{flbm,jdbcType=VARCHAR},
qxlb = #{qxlb,jdbcType=VARCHAR},
ybbm = #{ybbm,jdbcType=VARCHAR},
sptm = #{sptm,jdbcType=VARCHAR},
tyshxydm = #{tyshxydm,jdbcType=VARCHAR},
zczbhhzbapzbh = #{zczbhhzbapzbh,jdbcType=VARCHAR},
ylqxzcrbarmc = #{ylqxzcrbarmc,jdbcType=VARCHAR},
ylqxzcrbarywmc = #{ylqxzcrbarywmc,jdbcType=VARCHAR},
cpms = #{cpms,jdbcType=LONGVARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
supName = #{supName,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
`standard` = #{standard,jdbcType=VARCHAR},
qtbm = #{qtbm,jdbcType=VARCHAR},
zczyxqz = #{zczyxqz,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
price = #{price,jdbcType=VARCHAR},
`createUser` = #{createUser,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateUser = #{updateUser,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -65,6 +65,8 @@ 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('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1);
@ -102,6 +104,11 @@ 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 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 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, '', 2, 1);
INSERT 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, '', 3, 1);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1);
@ -137,6 +144,8 @@ CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)',
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', '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, '删除日志数据');
@ -161,6 +170,13 @@ 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('sup_cert_set', 'foreign', 'tinyint', 3);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1);

Loading…
Cancel
Save