3 天以前 | zhangherong | ![]() |
3 天以前 | Houjie | ![]() |
3 天以前 | Houjie | ![]() |
pom.xml
@@ -227,16 +227,16 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web-services</artifactId> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <!-- CXF webservice --> <!-- <dependency>--> <!-- <groupId>org.apache.cxf</groupId>--> <!-- <artifactId>cxf-spring-boot-starter-jaxws</artifactId>--> <!-- <version>${cxf.version}</version>--> <!-- </dependency>--> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxws</artifactId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <dependency> @@ -268,6 +268,10 @@ <exclusion> <artifactId>commons-beanutils</artifactId> <groupId>commons-beanutils</groupId> </exclusion> <exclusion> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> </exclusion> </exclusions> </dependency> @@ -527,11 +531,11 @@ <version>0.8</version> </dependency> <!--xmlè§£æå ï¼å¦æé¡¹ç®ä¸å·²æï¼å¼èµ·å²çªï¼å¯æ³¨é--> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.12.0</version> </dependency> <!-- <dependency>--> <!-- <groupId>xerces</groupId>--> <!-- <artifactId>xercesImpl</artifactId>--> <!-- <version>2.12.0</version>--> <!-- </dependency>--> <!--å¼å ¥sapä¾èµ--> <dependency> src/main/java/org/jeecg/JeecgSystemApplication.java
@@ -1,7 +1,6 @@ package org.jeecg; import lombok.extern.slf4j.Slf4j; import org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration; import org.flowable.spring.boot.eventregistry.EventRegistryServicesAutoConfiguration; import org.jeecg.common.util.oConvertUtils; import org.springframework.boot.SpringApplication; @@ -23,8 +22,7 @@ */ @Slf4j @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, MongoAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, EventRegistryServicesAutoConfiguration.class, CxfAutoConfiguration.class}) ManagementWebSecurityAutoConfiguration.class, EventRegistryServicesAutoConfiguration.class}) public class JeecgSystemApplication extends SpringBootServletInitializer { @Override src/main/java/org/jeecg/modules/base/controller/FactoryController.java
@@ -226,7 +226,7 @@ public Result<List<FactoryModel>> queryUserProductionLineList() { List<Factory> factoryList = factoryService.queryUserProductionLineList(); List<FactoryModel> factoryModels = factoryList.stream() .map(factory -> new FactoryModel(factory.getId(), factory.getFactoryName())) .map(factory -> new FactoryModel(factory.getId(), factory.getFactoryName(), factory.getProductionType())) .collect(Collectors.toList()); return Result.ok(factoryModels); } src/main/java/org/jeecg/modules/base/controller/PrinterConfigController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,186 @@ package org.jeecg.modules.base.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.base.entity.Factory; import org.jeecg.modules.base.entity.PrinterConfig; import org.jeecg.modules.base.model.FactoryModel; import org.jeecg.modules.base.model.PrinterModel; import org.jeecg.modules.base.service.IPrinterConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * @Description: æå°æºé ç½®ä¿¡æ¯ * @Author: jeecg-boot * @Date: 2025-06-24 * @Version: V1.0 */ @Api(tags="æå°æºé 置信æ¯") @RestController @RequestMapping("/base/printerConfig") @Slf4j public class PrinterConfigController extends JeecgController<PrinterConfig, IPrinterConfigService> { @Autowired private IPrinterConfigService printerConfigService; /** * å页å表æ¥è¯¢ * * @param printerConfig * @param pageNo * @param pageSize * @param req * @return */ @ApiOperation(value="æå°æºä¿¡æ¯-å页å表æ¥è¯¢", notes="æå°æºä¿¡æ¯-å页å表æ¥è¯¢") @GetMapping(value = "/list") public Result<IPage<PrinterConfig>> queryPageList(PrinterConfig printerConfig, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { QueryWrapper<PrinterConfig> queryWrapper = QueryGenerator.initQueryWrapper(printerConfig, req.getParameterMap()); Page<PrinterConfig> page = new Page<PrinterConfig>(pageNo, pageSize); IPage<PrinterConfig> pageList = printerConfigService.page(page, queryWrapper); return Result.OK(pageList); } @ApiOperation(value = "è·åæææå°æºIPå表", notes = "è·åæææå°æºIPå表") @GetMapping(value = "/queryUserPrinterConfigList") public Result<List<PrinterModel>> queryUserPrinterConfigList() { List<PrinterConfig> printerConfigList = printerConfigService.queryUserPrinterConfigList(); List<PrinterModel> factoryModels = printerConfigList.stream() .map(factory -> new PrinterModel(factory.getPrinterIp(), factory.getPrinterIp())) .collect(Collectors.toList()); return Result.ok(factoryModels); } /** * æ·»å * * @param printerConfig * @return */ @AutoLog(value = "æå°æºä¿¡æ¯-æ·»å ") @ApiOperation(value="æå°æºä¿¡æ¯-æ·»å ", notes="æå°æºä¿¡æ¯-æ·»å ") @PostMapping(value = "/add") public Result<String> add(@RequestBody PrinterConfig printerConfig) { printerConfig.setPrinterStatus(CommonConstant.STATUS_1); printerConfigService.save(printerConfig); return Result.OK("æ·»å æåï¼"); } /** * ç¼è¾ * * @param printerConfig * @return */ @AutoLog(value = "线边ä»åºä¿¡æ¯-ç¼è¾") @ApiOperation(value="线边ä»åºä¿¡æ¯-ç¼è¾", notes="线边ä»åºä¿¡æ¯-ç¼è¾") @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) public Result<String> edit(@RequestBody PrinterConfig printerConfig) { printerConfigService.updateById(printerConfig); return Result.OK("ç¼è¾æå!"); } /** * éè¿idå é¤ * * @param id * @return */ @AutoLog(value = "线边ä»åºä¿¡æ¯-éè¿idå é¤") @ApiOperation(value="线边ä»åºä¿¡æ¯-éè¿idå é¤", notes="线边ä»åºä¿¡æ¯-éè¿idå é¤") @DeleteMapping(value = "/delete") public Result<String> delete(@RequestParam(name="id",required=true) String id) { printerConfigService.removeById(id); return Result.OK("å 餿å!"); } /** * æ¹éå é¤ * * @param ids * @return */ @AutoLog(value = "æå°æºä¿¡æ¯-æ¹éå é¤") @ApiOperation(value="æå°æºä¿¡æ¯-æ¹éå é¤", notes="æå°æºä¿¡æ¯-æ¹éå é¤") @DeleteMapping(value = "/deleteBatch") public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { this.printerConfigService.removeByIds(Arrays.asList(ids.split(","))); return Result.OK("æ¹éå 餿å!"); } /** * éè¿idæ¥è¯¢ * * @param id * @return */ //@AutoLog(value = "线边ä»åºä¿¡æ¯-éè¿idæ¥è¯¢") @ApiOperation(value="æå°æºä¿¡æ¯-éè¿idæ¥è¯¢", notes="æå°æºä¿¡æ¯-éè¿idæ¥è¯¢") @GetMapping(value = "/queryById") public Result<PrinterConfig> queryById(@RequestParam(name="id",required=true) String id) { PrinterConfig lineSideWarehouse = printerConfigService.getById(id); if(lineSideWarehouse==null) { return Result.error("æªæ¾å°å¯¹åºæ°æ®"); } return Result.OK(lineSideWarehouse); } /** * 导åºexcel * * @param request * @param printerConfig */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, PrinterConfig printerConfig) { return super.exportXls(request, printerConfig, PrinterConfig.class, "æå°æºä¿¡æ¯"); } /** * éè¿excelå¯¼å ¥æ°æ® * * @param request * @param response * @return */ @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { return super.importExcel(request, response, PrinterConfig.class); } @AutoLog(value = "æå°æº-å¯ç¨&ç¦ç¨") @ApiOperation(value = "æå°æº-å¯ç¨&ç¦ç¨", notes = "æå°æº-å¯ç¨&ç¦ç¨") @PutMapping(value = "/active") public Result<?> active(@RequestParam(name = "id", required = true) String id) { PrinterConfig printerConfig = printerConfigService.getById(id); if (CommonConstant.STATUS_1.equals(printerConfig.getPrinterStatus())) { printerConfig.setPrinterStatus(CommonConstant.STATUS_0); } else { printerConfig.setPrinterStatus(CommonConstant.STATUS_1); } printerConfigService.updateById(printerConfig); return Result.ok("æä½æåï¼"); } } src/main/java/org/jeecg/modules/base/entity/PrinterConfig.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,101 @@ package org.jeecg.modules.base.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import org.jeecg.common.constant.CommonConstant; import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; /** * @Description: æå°æºé ç½®ä¿¡æ¯ * @Author: jeecg-boot * @Date: 2025-06-24 * @Version: V1.0 */ @Data @TableName("base_printer_config") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @ApiModel(value = "base_printer_config对象", description = "æå°æºé 置信æ¯") public class PrinterConfig implements Serializable { private static final long serialVersionUID = 1L; /** * ä¸»é® */ @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主é®") private String id; /** * å建人 */ @ApiModelProperty(value = "å建人") private String createBy; /** * å建æ¶é´ */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "å建æ¶é´") private Date createTime; /** * æ´æ°äºº */ @ApiModelProperty(value = "æ´æ°äºº") private String updateBy; /** * æ´æ°æ¶é´ */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "æ´æ°æ¶é´") private Date updateTime; /** * å 餿 è®° */ @Excel(name = "å 餿 è®°", width = 15) @ApiModelProperty(value = "å 餿 è®°") @TableLogic private Integer delFlag = CommonConstant.DEL_FLAG_0; /** * æå°æºIP */ @Excel(name = "æå°æºIP", width = 15) @ApiModelProperty(value = "æå°æºIP") private String printerIp; /** * æå°æºIP */ @Excel(name = "æå°æºåç§°", width = 15) @ApiModelProperty(value = "æå°æºåç§°") private String printerName; /** * æå°æºç«¯å£ */ @Excel(name = "æå°æºç«¯å£", width = 15) @ApiModelProperty(value = "æå°æºç«¯å£") private String portNumber; /** * æå°æºåå· */ @Excel(name = "æå°æºåå·", width = 15) @ApiModelProperty(value = "æå°æºåå·") private String printerModel; /**æå°æºç¶æ*/ @Excel(name = "æå°æºç¶æ", width = 15) @ApiModelProperty(value = "æå°æºç¶æ") private String printerStatus; } src/main/java/org/jeecg/modules/base/mapper/PrinterConfigMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,14 @@ package org.jeecg.modules.base.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.modules.base.entity.PrinterConfig; /** * @Description: æå°æºä¿¡æ¯é ç½® * @Author: jeecg-boot * @Date: 2025-06-24 * @Version: V1.0 */ public interface PrinterConfigMapper extends BaseMapper<PrinterConfig> { } src/main/java/org/jeecg/modules/base/mapper/xml/PrinterConfigMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ <?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="org.jeecg.modules.base.mapper.PrinterConfigMapper"> </mapper> src/main/java/org/jeecg/modules/base/model/FactoryModel.java
@@ -7,12 +7,13 @@ // getteråsetteræ¹æ³ private String value; // 产线ID private String text; // 产线åç§° private String type; // 产线类å public FactoryModel() { } public FactoryModel(String value, String text) { public FactoryModel(String value, String text, String type) { this.value = value; this.text = text; this.type = type; } } src/main/java/org/jeecg/modules/base/model/PrinterModel.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ package org.jeecg.modules.base.model; import lombok.Data; @Data public class PrinterModel { // getteråsetteræ¹æ³ private String value; private String text; public PrinterModel() { } public PrinterModel(String value, String text) { this.value = value; this.text = text; } } src/main/java/org/jeecg/modules/base/service/IPrinterConfigService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,21 @@ package org.jeecg.modules.base.service; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.base.entity.Factory; import org.jeecg.modules.base.entity.PrinterConfig; import java.util.List; /** * @Description: æå°æºé ç½® * @Author: jeecg-boot * @Date: 2025-06-24 * @Version: V1.0 */ public interface IPrinterConfigService extends IService<PrinterConfig> { /** * æ¥è¯¢IPå表 * @return */ List<PrinterConfig> queryUserPrinterConfigList(); } src/main/java/org/jeecg/modules/base/service/impl/PrinterConfigServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ package org.jeecg.modules.base.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.base.entity.Factory; import org.jeecg.modules.base.entity.PrinterConfig; import org.jeecg.modules.base.mapper.PrinterConfigMapper; import org.jeecg.modules.base.service.IPrinterConfigService; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * @Description: æå°æºé ç½®ä¿¡æ¯ * @Author: jeecg-boot * @Date: 2025-06-24 * @Version: V1.0 */ @Service public class PrinterConfigServiceImpl extends ServiceImpl<PrinterConfigMapper, PrinterConfig> implements IPrinterConfigService { @Override public List<PrinterConfig> queryUserPrinterConfigList() { //ç¨æ·æ°æ®æé LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if (sysUser == null) { return Collections.emptyList(); } LambdaQueryWrapper<PrinterConfig> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(PrinterConfig::getDelFlag, CommonConstant.DEL_FLAG_0); queryWrapper.eq(PrinterConfig::getPrinterStatus, "1"); return super.list(queryWrapper); } } src/main/java/org/jeecg/modules/eam/dto/MaintenanceStandardImport.java
@@ -11,13 +11,13 @@ @Excel(name = "NO", width = 15) private String itemCode; @Excel(name = "é¨ä½åç§°", width = 15) @Excel(name = "ç¹æ£å 容", width = 15) private String itemName; @Excel(name = "ç¹æ£å 容", width = 15) @Excel(name = "ç¹æ£æ¹æ³", width = 15) private String subItemName; @Excel(name = "ç¹æ£æ¹æ³", width = 15) @Excel(name = "é¨ä½åç§°", width = 15) private String itemPart; @Excel(name = "åºå", width = 15) src/main/java/org/jeecg/modules/wms/MESObjectFactory.java
ÎļþÒÑɾ³ý src/main/java/org/jeecg/modules/wms/dto/MESResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ package org.jeecg.modules.wms.dto; import lombok.Getter; import lombok.Setter; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; @Getter @Setter @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "WSResponse", propOrder = { "errorCode", "errorDesc" }) public class MESResponse { @XmlElement(name = "ErrorCode") protected String errorCode; @XmlElement(name = "ErrorDesc") protected String errorDesc; } src/main/java/org/jeecg/modules/wms/dto/ReceiveWMSScanItemListResponse.java
@@ -14,5 +14,5 @@ @Setter public class ReceiveWMSScanItemListResponse { @XmlElement(name = "ReceiveWMSScanItemListResult") protected WSResponse receiveWMSScanItemListResult; protected MESResponse receiveWMSScanItemListResult; } src/main/java/org/jeecg/modules/wms/service/MESWebServiceSoap.java
@@ -1,28 +1,18 @@ package org.jeecg.modules.wms.service; import org.jeecg.modules.wms.MESObjectFactory; import org.jeecg.modules.wms.dto.WSResponse; import org.jeecg.modules.wms.request.ReceiveWMSScanItemList; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; @WebService(name = "MESWebServiceSoap", targetNamespace = "http://xhj008.server.webservice.com/") @XmlSeeAlso({MESObjectFactory.class}) public interface MESWebServiceSoap { /** * æ¥æ¶WMSç§»åºä¿¡æ¯ * @param request * @return */ @WebMethod(operationName = "ReceiveWMSScanItemList", action = "http://xhj008.server.webservice.com/ReceiveWMSScanItemList") @RequestWrapper(localName = "ReceiveWMSScanItemList", targetNamespace = "http://xhj008.server.webservice.com/", className = "ReceiveWMSScanItemList") @ResponseWrapper(localName = "ReceiveWMSScanItemListResponse", targetNamespace = "http://xhj008.server.webservice.com/", className = "ReceiveWMSScanItemListResponse") @WebResult(name = "ReceiveWMSScanItemListResult", targetNamespace = "http://xhj008.server.webservice.com/") WSResponse receiveWMSScanItemList(@WebParam(name = "ReceiveWMSScanItemList", targetNamespace = "http://xhj008.server.webservice.com/") ReceiveWMSScanItemList request); @WebMethod WSResponse receiveWMSScanItemList(ReceiveWMSScanItemList request); } src/main/java/org/jeecg/modules/wms/service/impl/MESWebServiceSoapImpl.java
@@ -29,12 +29,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; import java.math.BigDecimal; @@ -60,12 +55,8 @@ @Override @Transactional(rollbackFor = Exception.class) @WebMethod(operationName = "ReceiveWMSScanItemList", action = "http://xhj008.server.webservice.com/ReceiveWMSScanItemList") @RequestWrapper(localName = "ReceiveWMSScanItemList", targetNamespace = "http://xhj008.server.webservice.com/", className = "ReceiveWMSScanItemList") @ResponseWrapper(localName = "ReceiveWMSScanItemListResponse", targetNamespace = "http://xhj008.server.webservice.com/", className = "ReceiveWMSScanItemListResponse") @WebResult(name = "ReceiveWMSScanItemListResult", targetNamespace = "http://xhj008.server.webservice.com/") @ApiLog(apiName = "æ¥æ¶WMSçç§»åºä¿¡æ¯(ReceiveWMSScanItemList(MES)", apiCategory = ApiLogCategoryEnum.WMS) public WSResponse receiveWMSScanItemList(@WebParam(name = "ReceiveWMSScanItemList", targetNamespace = "http://xhj008.server.webservice.com/") ReceiveWMSScanItemList request) { public WSResponse receiveWMSScanItemList(ReceiveWMSScanItemList request) { WSResponse response = new WSResponse(); if (request == null || CollectionUtil.isEmpty(request.getWmsWebServiceSendItemList())) { response.setErrorCode("N");