diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/BaseBarcodePrintinfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/BaseBarcodePrintinfoController.java new file mode 100644 index 00000000..dfea044f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/BaseBarcodePrintinfoController.java @@ -0,0 +1,132 @@ +package com.ruoyi.web.controller.nanjing; + +import java.util.List; + +import com.ruoyi.nanjing.domain.TBdProductinfo; +import com.ruoyi.nanjing.service.ITBdProductinfoService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.nanjing.domain.BaseBarcodePrintinfo; +import com.ruoyi.nanjing.service.IBaseBarcodePrintinfoService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 条码打印记录Controller + * + * @author ruoyi + * @date 2024-05-24 + */ +@Controller +@RequestMapping("/nanjing/PrintInfo") +public class BaseBarcodePrintinfoController extends BaseController +{ + private String prefix = "nanjing/PrintInfo"; + @Autowired + private ITBdProductinfoService tBdProductinfoService; + @Autowired + private IBaseBarcodePrintinfoService baseBarcodePrintinfoService; + + @RequiresPermissions("nanjing:PrintInfo:view") + @GetMapping() + public String PrintInfo(ModelMap map) + { + List tBdProductinfoList = tBdProductinfoService.selectTBdProductinfoList(new TBdProductinfo()); + map.addAttribute("list",tBdProductinfoList); + return prefix + "/PrintInfo"; + } + + /** + * 查询条码打印记录列表 + */ + @RequiresPermissions("nanjing:PrintInfo:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseBarcodePrintinfo baseBarcodePrintinfo) + { + startPage(); + List list = baseBarcodePrintinfoService.selectBaseBarcodePrintinfoList(baseBarcodePrintinfo); + return getDataTable(list); + } + + /** + * 导出条码打印记录列表 + */ + @RequiresPermissions("nanjing:PrintInfo:export") + @Log(title = "条码打印记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseBarcodePrintinfo baseBarcodePrintinfo) + { + List list = baseBarcodePrintinfoService.selectBaseBarcodePrintinfoList(baseBarcodePrintinfo); + ExcelUtil util = new ExcelUtil(BaseBarcodePrintinfo.class); + return util.exportExcel(list, "PrintInfo"); + } + + /** + * 新增条码打印记录 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存条码打印记录 + */ + @RequiresPermissions("nanjing:PrintInfo:add") + @Log(title = "条码打印记录", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseBarcodePrintinfo baseBarcodePrintinfo) + { + return toAjax(baseBarcodePrintinfoService.insertBaseBarcodePrintinfo(baseBarcodePrintinfo)); + } + + /** + * 修改条码打印记录 + */ + @GetMapping("/edit/{ID}") + public String edit(@PathVariable("ID") String ID, ModelMap mmap) + { + BaseBarcodePrintinfo baseBarcodePrintinfo = baseBarcodePrintinfoService.selectBaseBarcodePrintinfoById(ID); + mmap.put("baseBarcodePrintinfo", baseBarcodePrintinfo); + return prefix + "/edit"; + } + + /** + * 修改保存条码打印记录 + */ + @RequiresPermissions("nanjing:PrintInfo:edit") + @Log(title = "条码打印记录", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseBarcodePrintinfo baseBarcodePrintinfo) + { + return toAjax(baseBarcodePrintinfoService.updateBaseBarcodePrintinfo(baseBarcodePrintinfo)); + } + + /** + * 删除条码打印记录 + */ + @RequiresPermissions("nanjing:PrintInfo:remove") + @Log(title = "条码打印记录", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(baseBarcodePrintinfoService.deleteBaseBarcodePrintinfoByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectParaAllController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectParaAllController.java index 5a86fe88..21e51850 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectParaAllController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectParaAllController.java @@ -38,6 +38,7 @@ public class SelectParaAllController extends BaseController { { return prefix + "/ParaAllShow"; } + @PostMapping("/paraAllShow") @ResponseBody public TableDataInfo list(HttpServletRequest request) @@ -55,6 +56,7 @@ public class SelectParaAllController extends BaseController { } + // @RequiresPermissions("nanjing:ParaAllShow:export") // @Log(title = "产品码查询", businessType = BusinessType.EXPORT) // @PostMapping("/export") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectProRpListController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectProRpListController.java index cd0be778..25defb43 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectProRpListController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/SelectProRpListController.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.text.Convert; import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.TBdProductinfo; +import com.ruoyi.nanjing.domain.TSyTracestate; import com.ruoyi.nanjing.service.ITBdProductinfoService; import com.ruoyi.nanjing.service.ITBdProducttypeService; import com.ruoyi.nanjing.service.ITSyTracestateService; @@ -45,7 +46,8 @@ public class SelectProRpListController extends BaseController private ITBdProductinfoService tBdProductinfoService; @Autowired private ITBdProducttypeService itBdProducttypeService; - + @Autowired + private ITSyTracestateService tracestateService; @RequiresPermissions("nanjing:ProRpList:view") @GetMapping() public String ProRpList(ModelMap map) @@ -77,22 +79,23 @@ public class SelectProRpListController extends BaseController @PostMapping("/getData") @ResponseBody - public TableDataInfo getData(ProRpList proRpList) + public TableDataInfo getDataList(TSyTracestate TSyTracestate) { -// startPage(); - List list = new ArrayList(); - if(proRpList.getBeginTime()==null||proRpList.getEndTime()==null) - { - return getDataTable(list); - } - Map map = new HashMap(); - map.put("beginTime",proRpList.getBeginTime()); - map.put("endTime",proRpList.getEndTime()); - map.put("productId",proRpList.getProductID()); - map.put("productType",proRpList.getProductType()); - map.put("state",proRpList.getState()); - map.put("semiBarcode",proRpList.getSemiBarcode()); - list = itBdProducttypeService.selectProLists(map); + startPage(); + List list = tracestateService.selectTSyTracestateList(TSyTracestate); + return getDataTable(list); + } + + @PostMapping("/selectAllPara") + @ResponseBody + public TableDataInfo selectAllPara(String semiBarcode) + { + startPage(); + Map map = new HashMap(); + map.put("beginTime",null); + map.put("endTime",null); + map.put("semiBarcode",semiBarcode); + List>> list = tracestateService.selectAllPara(map); return getDataTable(list); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdSubstationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdSubstationController.java index 57eeb2ce..da629d8d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdSubstationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdSubstationController.java @@ -72,7 +72,7 @@ public class TBdSubstationController extends BaseController @GetMapping("/shangyi") @ResponseBody public String shang(Integer value){ - System.out.println(value); + //System.out.println(value); return tBdSubstationService.selectshang(value); } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 500a8a75..a3291bc2 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -5,14 +5,14 @@ spring: driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver druid: # 主库数据源 - master: - url: jdbc:sqlserver://192.168.1.120:1433;SelectMethod=cursor;DatabaseName=ATJ_581_DB - username: sa - password: 123456 # master: -# url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=ATJ_581_DB +# url: jdbc:sqlserver://192.168.1.120:1433;SelectMethod=cursor;DatabaseName=ATJ_581_DB # username: sa # password: 123456 + master: + url: jdbc:sqlserver://119.45.202.115:1433;SelectMethod=cursor;DatabaseName=ATJ_581_DB + username: sa + password: haiwei@123 # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/templates/login.html b/ruoyi-admin/src/main/resources/templates/login.html index dd30a746..673f19c7 100644 --- a/ruoyi-admin/src/main/resources/templates/login.html +++ b/ruoyi-admin/src/main/resources/templates/login.html @@ -44,8 +44,8 @@

用户登录:

- - + +
diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/ProRpList/SelectProRpList.html b/ruoyi-admin/src/main/resources/templates/nanjing/ProRpList/SelectProRpList.html index c27f7012..e491badb 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/ProRpList/SelectProRpList.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/ProRpList/SelectProRpList.html @@ -2,6 +2,7 @@ +
@@ -12,13 +13,13 @@
  • - + - - +
  • - +
  • @@ -34,13 +35,13 @@
  • -
  • - - -
  • + + + + + + + @@ -56,10 +57,24 @@
+
+ +
+
+
+
+
+
+
+
+ diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/SubStation/SubStation.html b/ruoyi-admin/src/main/resources/templates/nanjing/SubStation/SubStation.html index 4d65ed0e..fb9d2273 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/SubStation/SubStation.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/SubStation/SubStation.html @@ -167,7 +167,7 @@ }] }; $.table.init(options); - console.log(options) + //console.log(options) }); diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TSyTracestate.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TSyTracestate.java index f87db860..f9f2956a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TSyTracestate.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TSyTracestate.java @@ -20,6 +20,8 @@ public class TSyTracestate extends BaseEntity @Excel(name = "null") private String barcode; + private String productName; + /** 产品ID */ @Excel(name = "产品ID") private String productID; @@ -125,6 +127,15 @@ public class TSyTracestate extends BaseEntity { return barcode; } + public void setProductName(String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return productName; + } public void setProductID(String productID) { this.productID = productID; diff --git a/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml b/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml index 7afbd0c6..ca9eb5f3 100644 --- a/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml @@ -96,9 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) } - - - + + select t1.Barcode as 系统条码,t5.ProductBarcode as 产品码, t2.ProductName as 机种类型,case t1.isDis when 1 then ' Y' else 'N' end as '返修Y/N' , @@ -100,8 +113,19 @@ where t5.ProductBarcode=#{semiCode,jdbcType = VARCHAR}