Browse Source

[delete]

删除旧版无用的制工单子表列表对象 workorder_list和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据
删除旧版无用的制工对象 workorderhead和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据
dev
liuxiaoxu 1 month ago
parent
commit
ba81ea6a58
  1. 130
      ruoyi-admin/src/main/java/com/ruoyi/produce/controller/WorkorderListController.java
  2. 162
      ruoyi-admin/src/main/java/com/ruoyi/produce/controller/WorkorderheadController.java
  3. 353
      ruoyi-admin/src/main/java/com/ruoyi/produce/domain/WorkorderList.java
  4. 634
      ruoyi-admin/src/main/java/com/ruoyi/produce/domain/Workorderhead.java
  5. 62
      ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/WorkorderListMapper.java
  6. 65
      ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/WorkorderheadMapper.java
  7. 62
      ruoyi-admin/src/main/java/com/ruoyi/produce/service/IWorkorderListService.java
  8. 65
      ruoyi-admin/src/main/java/com/ruoyi/produce/service/IWorkorderheadService.java
  9. 95
      ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/WorkorderListServiceImpl.java
  10. 199
      ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/WorkorderheadServiceImpl.java
  11. 165
      ruoyi-admin/src/main/resources/mapper/produce/WorkorderListMapper.xml
  12. 227
      ruoyi-admin/src/main/resources/mapper/produce/WorkorderheadMapper.xml
  13. 163
      ruoyi-admin/src/main/resources/templates/produce/list/add.html
  14. 164
      ruoyi-admin/src/main/resources/templates/produce/list/edit.html
  15. 253
      ruoyi-admin/src/main/resources/templates/produce/list/list.html
  16. 1001
      ruoyi-admin/src/main/resources/templates/produce/workorderhead/add.html
  17. 916
      ruoyi-admin/src/main/resources/templates/produce/workorderhead/edit.html
  18. 440
      ruoyi-admin/src/main/resources/templates/produce/workorderhead/workorderhead.html

130
ruoyi-admin/src/main/java/com/ruoyi/produce/controller/WorkorderListController.java

@ -1,130 +0,0 @@
package com.ruoyi.produce.controller;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.produce.domain.WorkorderList;
import com.ruoyi.produce.service.IWorkorderListService;
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.*;
import java.util.List;
/**
* 制工单子表列表Controller
*
* @author ruoyi
* @date 2021-11-12
*/
@Controller
@RequestMapping("/produce/list")
public class WorkorderListController extends BaseController
{
private String prefix = "produce/list";
@Autowired
private IWorkorderListService workorderListService;
@RequiresPermissions("produce:list:view")
@GetMapping()
public String list()
{
return prefix + "/list";
}
/**
* 查询制工单子表列表列表
*/
@RequiresPermissions("produce:list:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WorkorderList workorderList)
{
startPage();
List<WorkorderList> list = workorderListService.selectWorkorderListList(workorderList);
return getDataTable(list);
}
/**
* 导出制工单子表列表列表
*/
@RequiresPermissions("produce:list:export")
@Log(title = "制工单子表列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WorkorderList workorderList)
{
List<WorkorderList> list = workorderListService.selectWorkorderListList(workorderList);
ExcelUtil<WorkorderList> util = new ExcelUtil<WorkorderList>(WorkorderList.class);
return util.exportExcel(list, "制工单子表列表数据");
}
/**
* 新增制工单子表列表
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存制工单子表列表
*/
@RequiresPermissions("produce:list:add")
@Log(title = "制工单子表列表", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WorkorderList workorderList)
{
return toAjax(workorderListService.insertWorkorderList(workorderList));
}
/**
* 修改制工单子表列表
*/
@GetMapping("/edit/{poId}")
public String edit(@PathVariable("poId") String poId, ModelMap mmap)
{
WorkorderList workorderList = workorderListService.selectWorkorderListById(poId);
mmap.put("workorderList", workorderList);
return prefix + "/edit";
}
/**
* 修改保存制工单子表列表
*/
@RequiresPermissions("produce:list:edit")
@Log(title = "制工单子表列表", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WorkorderList workorderList)
{
return toAjax(workorderListService.updateWorkorderList(workorderList));
}
/**
* 删除制工单子表列表
*/
@RequiresPermissions("produce:list:remove")
@Log(title = "制工单子表列表", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(workorderListService.deleteWorkorderListByIds(ids));
}
@ResponseBody
@PostMapping("/getList")
public Result getList(WorkorderList workorderList)throws Exception{
return Result.getSuccessResult(workorderListService.selectWorkorderListList(workorderList));
}
}

162
ruoyi-admin/src/main/java/com/ruoyi/produce/controller/WorkorderheadController.java

@ -1,162 +0,0 @@
package com.ruoyi.produce.controller;
import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.produce.domain.Workorderhead;
import com.ruoyi.produce.service.IWorkorderheadService;
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.*;
import java.util.Date;
import java.util.List;
/**
* 制工Controller
*
* @author ruoyi
* @date 2021-11-09
*/
@Controller
@RequestMapping("/produce/workorderhead")
public class WorkorderheadController extends BaseController {
private String prefix = "produce/workorderhead";
@Autowired
private IWorkorderheadService workorderheadService;
@RequiresPermissions("produce:workorderhead:view")
@GetMapping()
public String workorderhead() {
return prefix + "/workorderhead";
}
/**
* 查询制工列表
*/
@RequiresPermissions("produce:workorderhead:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(Workorderhead workorderhead) {
startPage();
List<Workorderhead> list = workorderheadService.selectWorkorderheadList(workorderhead);
return getDataTable(list);
}
/**
* 导出制工列表
*/
@RequiresPermissions("produce:workorderhead:export")
@Log(title = "制工", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Workorderhead workorderhead) {
List<Workorderhead> list = workorderheadService.selectWorkorderheadList(workorderhead);
ExcelUtil<Workorderhead> util = new ExcelUtil<Workorderhead>(Workorderhead.class);
return util.exportExcel(list, "制工数据");
}
/**
* 新增制工
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
* 新增保存制工
*/
@RequiresPermissions("produce:workorderhead:add")
@Log(title = "制工", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public Result addSave(String jsonStr) throws Exception {
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
Workorderhead workorderhead = jsonObject.toJavaObject(Workorderhead.class);
if (StringUtils.isEmpty(workorderhead.getPoNo())) {
return Result.getFailResult("订单号不能为空!", null);
}
if (StringUtils.isEmpty(workorderhead.getPiNo())) {
return Result.getFailResult("line不能为空!", null);
}
Long cpQty = workorderhead.getCpQty();
if (cpQty == null || cpQty <= 0) {
return Result.getFailResult("订单数量不能为空!", null);
}
Long ylCpQty = workorderhead.getYlCpQty();
if (ylCpQty == null || ylCpQty <= 0) {
return Result.getFailResult("投单数量不能为空!", null);
}
Date sendDate = workorderhead.getSendDate();
if (sendDate==null){
return Result.getFailResult("交货日期不能为空!", null);
}
int i = workorderheadService.insertWorkorderhead(workorderhead);
return Result.getSuccessResult(i);
}
/**
* 修改制工
*/
@GetMapping("/edit/{poId}")
public String edit(@PathVariable("poId") String poId, ModelMap mmap) {
Workorderhead workorderhead = workorderheadService.selectWorkorderheadById(poId);
mmap.put("workorderhead", workorderhead);
return prefix + "/edit";
}
/**
* 修改保存制工
*/
@RequiresPermissions("produce:workorderhead:edit")
@Log(title = "制工", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public Result editSave(String jsonStr) throws Exception {
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
Workorderhead workorderhead = jsonObject.toJavaObject(Workorderhead.class);
if (StringUtils.isEmpty(workorderhead.getPoNo())) {
return Result.getFailResult("订单号不能为空!", null);
}
if (StringUtils.isEmpty(workorderhead.getPiNo())) {
return Result.getFailResult("line不能为空!", null);
}
Long cpQty = workorderhead.getCpQty();
if (cpQty == null || cpQty <= 0) {
return Result.getFailResult("订单数量不能为空!", null);
}
Long ylCpQty = workorderhead.getYlCpQty();
if (ylCpQty == null || ylCpQty <= 0) {
return Result.getFailResult("投单数量不能为空!", null);
}
int i = workorderheadService.updateWorkorderhead(workorderhead);
return Result.getSuccessResult(i);
}
/**
* 删除制工
*/
@RequiresPermissions("produce:workorderhead:remove")
@Log(title = "制工", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(workorderheadService.deleteWorkorderheadByIds(ids));
}
@PostMapping("/count")
@ResponseBody
public Result getPoId() throws Exception {
return workorderheadService.findCountByDay();
}
}

353
ruoyi-admin/src/main/java/com/ruoyi/produce/domain/WorkorderList.java

@ -1,353 +0,0 @@
package com.ruoyi.produce.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
/**
* 制工单子表列表对象 workorder_list
*
* @author ruoyi
* @date 2021-11-12
*/
public class WorkorderList extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
@Excel(name = "")
private String poId;
/** */
@Excel(name = "")
private String PNO;
/** */
@JSONField(name = "wlCode")
@Excel(name = "")
private String wlCode;
/** */
@JSONField(name = "itemname")
@Excel(name = "")
private String itemname;
/** */
@JSONField(name = "cpType")
@Excel(name = "")
private String itemstandard;
/** */
@JSONField(name = "cpDw")
@Excel(name = "")
private String stockDw;
/** 计划数量 */
@Excel(name = "")
private BigDecimal Qty;
/** */
@Excel(name = "")
private BigDecimal Weight;
/** */
@Excel(name = "")
private String MemoList;
/** */
@Excel(name = "实领数量")
private BigDecimal OrderQty;
/** */
@Excel(name = "")
private BigDecimal qQty;
/** */
@Excel(name = "")
private String wldm;
/** */
@Excel(name = "退回数量")
private BigDecimal returnQty;
/** */
@Excel(name = "")
private BigDecimal jaQty;
/** */
@Excel(name = "")
private String baseCode;
/** */
@Excel(name = "")
private BigDecimal fuWidth;
/** */
@Excel(name = "")
private String yflItemclass;
/** */
@Excel(name = "")
private String mouldNo;
/** */
@Excel(name = "")
private Long tiaoNum;
/** */
@Excel(name = "")
private String zpGuige;
/** */
@Excel(name = "")
private BigDecimal zpQty;
/** */
@Excel(name = "")
private BigDecimal llQty;
/** */
@Excel(name = "")
private BigDecimal qLlQty;
public void setPoId(String poId)
{
this.poId = poId;
}
public String getPoId()
{
return poId;
}
public void setPNO(String PNO)
{
this.PNO = PNO;
}
public String getPNO()
{
return PNO;
}
public void setWlCode(String wlCode)
{
this.wlCode = wlCode;
}
public String getWlCode()
{
return wlCode;
}
public void setItemname(String Itemname)
{
this.itemname = Itemname;
}
public String getItemname()
{
return itemname;
}
public void setItemstandard(String Itemstandard)
{
this.itemstandard = Itemstandard;
}
public String getItemstandard()
{
return itemstandard;
}
public void setStockDw(String stockDw)
{
this.stockDw = stockDw;
}
public String getStockDw()
{
return stockDw;
}
public void setQty(BigDecimal Qty)
{
this.Qty = Qty;
}
public BigDecimal getQty()
{
return Qty;
}
public void setWeight(BigDecimal Weight)
{
this.Weight = Weight;
}
public BigDecimal getWeight()
{
return Weight;
}
public void setMemoList(String MemoList)
{
this.MemoList = MemoList;
}
public String getMemoList()
{
return MemoList;
}
public void setOrderQty(BigDecimal OrderQty)
{
this.OrderQty = OrderQty;
}
public BigDecimal getOrderQty()
{
return OrderQty;
}
public void setqQty(BigDecimal qQty)
{
this.qQty = qQty;
}
public BigDecimal getqQty()
{
return qQty;
}
public void setWldm(String wldm)
{
this.wldm = wldm;
}
public String getWldm()
{
return wldm;
}
public void setReturnQty(BigDecimal returnQty)
{
this.returnQty = returnQty;
}
public BigDecimal getReturnQty()
{
return returnQty;
}
public void setJaQty(BigDecimal jaQty)
{
this.jaQty = jaQty;
}
public BigDecimal getJaQty()
{
return jaQty;
}
public void setBaseCode(String baseCode)
{
this.baseCode = baseCode;
}
public String getBaseCode()
{
return baseCode;
}
public void setFuWidth(BigDecimal fuWidth)
{
this.fuWidth = fuWidth;
}
public BigDecimal getFuWidth()
{
return fuWidth;
}
public void setYflItemclass(String yflItemclass)
{
this.yflItemclass = yflItemclass;
}
public String getYflItemclass()
{
return yflItemclass;
}
public void setMouldNo(String mouldNo)
{
this.mouldNo = mouldNo;
}
public String getMouldNo()
{
return mouldNo;
}
public void setTiaoNum(Long tiaoNum)
{
this.tiaoNum = tiaoNum;
}
public Long getTiaoNum()
{
return tiaoNum;
}
public void setZpGuige(String zpGuige)
{
this.zpGuige = zpGuige;
}
public String getZpGuige()
{
return zpGuige;
}
public void setZpQty(BigDecimal zpQty)
{
this.zpQty = zpQty;
}
public BigDecimal getZpQty()
{
return zpQty;
}
public void setLlQty(BigDecimal llQty)
{
this.llQty = llQty;
}
public BigDecimal getLlQty()
{
return llQty;
}
public void setqLlQty(BigDecimal qLlQty)
{
this.qLlQty = qLlQty;
}
public BigDecimal getqLlQty()
{
return qLlQty;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("poId", getPoId())
.append("PNO", getPNO())
.append("wlCode", getWlCode())
.append("Itemname", getItemname())
.append("Itemstandard", getItemstandard())
.append("stockDw", getStockDw())
.append("Qty", getQty())
.append("Weight", getWeight())
.append("MemoList", getMemoList())
.append("OrderQty", getOrderQty())
.append("qQty", getqQty())
.append("wldm", getWldm())
.append("returnQty", getReturnQty())
.append("jaQty", getJaQty())
.append("baseCode", getBaseCode())
.append("fuWidth", getFuWidth())
.append("yflItemclass", getYflItemclass())
.append("mouldNo", getMouldNo())
.append("tiaoNum", getTiaoNum())
.append("zpGuige", getZpGuige())
.append("zpQty", getZpQty())
.append("llQty", getLlQty())
.append("qLlQty", getqLlQty())
.toString();
}
}

634
ruoyi-admin/src/main/java/com/ruoyi/produce/domain/Workorderhead.java

@ -1,634 +0,0 @@
package com.ruoyi.produce.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 制工对象 workorderhead
*
* @author ruoyi
* @date 2021-11-09
*/
public class Workorderhead extends BaseEntity implements Cloneable{
private static final long serialVersionUID = 1L;
/**
* 工单号
*/
@Excel(name = "工单号")
private String poId;
/**
* 订单号
*/
@Excel(name = "订单号")
private String poNo;
/**
* 工单号
*/
private String workNo;
/**
*
*/
private String piNo;
/**
* 客户代码
*/
@Excel(name = "客户代码")
private String pCode;
/**
* 公司名称
*/
@Excel(name = "公司名称")
private String pName;
/**
* 开工日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JSONField(format="yyyy-MM-dd")
@Excel(name = "开工日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date beginDate;
/**
* 完工日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JSONField(format="yyyy-MM-dd")
@Excel(name = "完工日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date endDate;
/**
* 开单日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JSONField(format="yyyy-MM-dd")
@Excel(name = "开单日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date poDate;
/**
* 发货日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JSONField(format="yyyy-MM-dd")
@Excel(name = "发货日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendDate;
/**
* 工单类型
*/
@Excel(name = "工单类型")
private String workorderClass;
/**
* 成品代码
*/
@Excel(name = "成品代码")
private String cpCode;
/**
* 成品名称
*/
@Excel(name = "成品名称")
private String cpName;
/**
*
*/
private String cpType;
/**
* 规格型号
*/
@Excel(name = "规格型号")
private String cpMachineno;
/**
* 单位
*/
@Excel(name = "单位")
private String cpDw;
/**
* 数量
*/
@Excel(name = "订单数量")
private Long cpQty;
/**
* 投单数量
*/
@Excel(name = "投单数量")
private Long ylCpQty;
/**
* 完工入库数量
*/
@Excel(name = "完工入库数量")
private Long cpInQty;
/**
* 欠工单数量
*/
@Excel(name = "欠工单数量")
private Long qdQty;
/**
* 备注
*/
@Excel(name = "备注")
private String bzMemo;
/**
* 是否结案
*/
@Excel(name = "是否结案")
private Integer endFlag;
/**
*
*/
private Integer chinaInOrOut;
/**
*
*/
private Integer isDelete;
/**
* 成品料号
*/
private String cpwldm;
/**
*
*/
private Long nowcpstockqty;
/**
* 内外销选择
*/
private String NWX;
/**
*
*/
private Integer haveprint;
/**
* 版本号
*/
private String bomVersionNo;
/**
*
*/
private BigDecimal badQty;
/**
*
*/
private String jaMan;
/**
*
*/
private Date jaTime;
/**
*
*/
@Excel(name = "")
private String department;
/**
*
*/
private String cpWeizhi;
/**
*
*/
private String mjWeizhi;
/**
* 版本号
*/
private String versionNo;
/**
*
*/
private String Factory;
/**
* 制造数量
*/
private BigDecimal madeQty;
/**
* 损耗
*/
private BigDecimal qMadeQty;
private List<WorkorderList> workorderLists;
private String processName;
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public List<WorkorderList> getWorkorderLists() {
return workorderLists;
}
public void setWorkorderLists(List<WorkorderList> workorderLists) {
this.workorderLists = workorderLists;
}
public void setPoId(String poId) {
this.poId = poId;
}
public String getPoId() {
return poId;
}
public void setPoNo(String poNo) {
this.poNo = poNo;
}
public String getPoNo() {
return poNo;
}
public void setWorkNo(String workNo) {
this.workNo = workNo;
}
public String getWorkNo() {
return workNo;
}
public void setPiNo(String piNo) {
this.piNo = piNo;
}
public String getPiNo() {
return piNo;
}
public void setpCode(String pCode) {
this.pCode = pCode;
}
public String getpCode() {
return pCode;
}
public void setpName(String pName) {
this.pName = pName;
}
public String getpName() {
return pName;
}
public void setBeginDate(Date beginDate) {
this.beginDate = beginDate;
}
public Date getBeginDate() {
return beginDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getEndDate() {
return endDate;
}
public void setPoDate(Date poDate) {
this.poDate = poDate;
}
public Date getPoDate() {
return poDate;
}
public void setSendDate(Date sendDate) {
this.sendDate = sendDate;
}
public Date getSendDate() {
return sendDate;
}
public void setWorkorderClass(String workorderClass) {
this.workorderClass = workorderClass;
}
public String getWorkorderClass() {
return workorderClass;
}
public void setCpCode(String cpCode) {
this.cpCode = cpCode;
}
public String getCpCode() {
return cpCode;
}
public void setCpName(String cpName) {
this.cpName = cpName;
}
public String getCpName() {
return cpName;
}
public void setCpType(String cpType) {
this.cpType = cpType;
}
public String getCpType() {
return cpType;
}
public void setCpMachineno(String cpMachineno) {
this.cpMachineno = cpMachineno;
}
public String getCpMachineno() {
return cpMachineno;
}
public void setCpDw(String cpDw) {
this.cpDw = cpDw;
}
public String getCpDw() {
return cpDw;
}
public void setCpQty(Long cpQty) {
this.cpQty = cpQty;
}
public Long getCpQty() {
return cpQty;
}
public void setYlCpQty(Long ylCpQty) {
this.ylCpQty = ylCpQty;
}
public Long getYlCpQty() {
return ylCpQty;
}
public void setCpInQty(Long cpInQty) {
this.cpInQty = cpInQty;
}
public Long getCpInQty() {
return cpInQty;
}
public void setQdQty(Long qdQty) {
this.qdQty = qdQty;
}
public Long getQdQty() {
return qdQty;
}
public void setBzMemo(String bzMemo) {
this.bzMemo = bzMemo;
}
public String getBzMemo() {
return bzMemo;
}
public void setEndFlag(Integer endFlag) {
this.endFlag = endFlag;
}
public Integer getEndFlag() {
return endFlag;
}
public void setChinaInOrOut(Integer chinaInOrOut) {
this.chinaInOrOut = chinaInOrOut;
}
public Integer getChinaInOrOut() {
return chinaInOrOut;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Integer getIsDelete() {
return isDelete;
}
public void setCpwldm(String cpwldm) {
this.cpwldm = cpwldm;
}
public String getCpwldm() {
return cpwldm;
}
public void setNowcpstockqty(Long nowcpstockqty) {
this.nowcpstockqty = nowcpstockqty;
}
public Long getNowcpstockqty() {
return nowcpstockqty;
}
public void setNWX(String NWX) {
this.NWX = NWX;
}
public String getNWX() {
return NWX;
}
public void setHaveprint(Integer haveprint) {
this.haveprint = haveprint;
}
public Integer getHaveprint() {
return haveprint;
}
public void setBomVersionNo(String bomVersionNo) {
this.bomVersionNo = bomVersionNo;
}
public String getBomVersionNo() {
return bomVersionNo;
}
public void setBadQty(BigDecimal badQty) {
this.badQty = badQty;
}
public BigDecimal getBadQty() {
return badQty;
}
public void setJaMan(String jaMan) {
this.jaMan = jaMan;
}
public String getJaMan() {
return jaMan;
}
public void setJaTime(Date jaTime) {
this.jaTime = jaTime;
}
public Date getJaTime() {
return jaTime;
}
public void setDepartment(String department) {
this.department = department;
}
public String getDepartment() {
return department;
}
public void setCpWeizhi(String cpWeizhi) {
this.cpWeizhi = cpWeizhi;
}
public String getCpWeizhi() {
return cpWeizhi;
}
public void setMjWeizhi(String mjWeizhi) {
this.mjWeizhi = mjWeizhi;
}
public String getMjWeizhi() {
return mjWeizhi;
}
public void setVersionNo(String versionNo) {
this.versionNo = versionNo;
}
public String getVersionNo() {
return versionNo;
}
public void setFactory(String Factory) {
this.Factory = Factory;
}
public String getFactory() {
return Factory;
}
public void setMadeQty(BigDecimal madeQty) {
this.madeQty = madeQty;
}
public BigDecimal getMadeQty() {
return madeQty;
}
public void setqMadeQty(BigDecimal qMadeQty) {
this.qMadeQty = qMadeQty;
}
public BigDecimal getqMadeQty() {
return qMadeQty;
}
@Override
public String toString() {
return "Workorderhead{" +
"poId='" + poId + '\'' +
", poNo='" + poNo + '\'' +
", workNo='" + workNo + '\'' +
", piNo='" + piNo + '\'' +
", pCode='" + pCode + '\'' +
", pName='" + pName + '\'' +
", beginDate=" + beginDate +
", endDate=" + endDate +
", poDate=" + poDate +
", sendDate=" + sendDate +
", workorderClass='" + workorderClass + '\'' +
", cpCode='" + cpCode + '\'' +
", cpName='" + cpName + '\'' +
", cpType='" + cpType + '\'' +
", cpMachineno='" + cpMachineno + '\'' +
", cpDw='" + cpDw + '\'' +
", cpQty=" + cpQty +
", ylCpQty=" + ylCpQty +
", cpInQty=" + cpInQty +
", qdQty=" + qdQty +
", bzMemo='" + bzMemo + '\'' +
", endFlag=" + endFlag +
", chinaInOrOut=" + chinaInOrOut +
", isDelete=" + isDelete +
", cpwldm='" + cpwldm + '\'' +
", nowcpstockqty=" + nowcpstockqty +
", NWX='" + NWX + '\'' +
", haveprint=" + haveprint +
", bomVersionNo='" + bomVersionNo + '\'' +
", badQty=" + badQty +
", jaMan='" + jaMan + '\'' +
", jaTime=" + jaTime +
", department='" + department + '\'' +
", cpWeizhi='" + cpWeizhi + '\'' +
", mjWeizhi='" + mjWeizhi + '\'' +
", versionNo='" + versionNo + '\'' +
", Factory='" + Factory + '\'' +
", madeQty=" + madeQty +
", qMadeQty=" + qMadeQty +
", workorderLists=" + workorderLists +
", processName='" + processName + '\'' +
'}';
}
@Override
public Workorderhead clone() {
Workorderhead workorderhead = new Workorderhead();
try {
workorderhead = (Workorderhead) super.clone();
} catch (Exception e) {
e.printStackTrace();
}
return workorderhead;
}
}

62
ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/WorkorderListMapper.java

@ -1,62 +0,0 @@
package com.ruoyi.produce.mapper;
import com.ruoyi.produce.domain.WorkorderList;
import java.util.List;
/**
* 制工单子表列表Mapper接口
*
* @author ruoyi
* @date 2021-11-12
*/
public interface WorkorderListMapper
{
/**
* 查询制工单子表列表
*
* @param poId 制工单子表列表ID
* @return 制工单子表列表
*/
public WorkorderList selectWorkorderListById(String poId);
/**
* 查询制工单子表列表列表
*
* @param workorderList 制工单子表列表
* @return 制工单子表列表集合
*/
public List<WorkorderList> selectWorkorderListList(WorkorderList workorderList);
/**
* 新增制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
public int insertWorkorderList(WorkorderList workorderList);
/**
* 修改制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
public int updateWorkorderList(WorkorderList workorderList);
/**
* 删除制工单子表列表
*
* @param poId 制工单子表列表ID
* @return 结果
*/
public int deleteWorkorderListById(String poId);
/**
* 批量删除制工单子表列表
*
* @param poIds 需要删除的数据ID
* @return 结果
*/
public int deleteWorkorderListByIds(String[] poIds);
}

65
ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/WorkorderheadMapper.java

@ -1,65 +0,0 @@
package com.ruoyi.produce.mapper;
import com.ruoyi.produce.domain.Workorderhead;
import java.util.List;
/**
* 制工Mapper接口
*
* @author ruoyi
* @date 2021-11-09
*/
public interface WorkorderheadMapper
{
/**
* 查询制工
*
* @param poId 制工ID
* @return 制工
*/
public Workorderhead selectWorkorderheadById(String poId);
/**
* 查询制工列表
*
* @param workorderhead 制工
* @return 制工集合
*/
public List<Workorderhead> selectWorkorderheadList(Workorderhead workorderhead);
/**
* 新增制工
*
* @param workorderhead 制工
* @return 结果
*/
public int insertWorkorderhead(Workorderhead workorderhead);
/**
* 修改制工
*
* @param workorderhead 制工
* @return 结果
*/
public int updateWorkorderhead(Workorderhead workorderhead);
/**
* 删除制工
*
* @param poId 制工ID
* @return 结果
*/
public int deleteWorkorderheadById(String poId);
/**
* 批量删除制工
*
* @param poIds 需要删除的数据ID
* @return 结果
*/
public int deleteWorkorderheadByIds(String[] poIds);
public Integer selectCountByDay();
}

62
ruoyi-admin/src/main/java/com/ruoyi/produce/service/IWorkorderListService.java

@ -1,62 +0,0 @@
package com.ruoyi.produce.service;
import com.ruoyi.produce.domain.WorkorderList;
import java.util.List;
/**
* 制工单子表列表Service接口
*
* @author ruoyi
* @date 2021-11-12
*/
public interface IWorkorderListService
{
/**
* 查询制工单子表列表
*
* @param poId 制工单子表列表ID
* @return 制工单子表列表
*/
public WorkorderList selectWorkorderListById(String poId);
/**
* 查询制工单子表列表列表
*
* @param workorderList 制工单子表列表
* @return 制工单子表列表集合
*/
public List<WorkorderList> selectWorkorderListList(WorkorderList workorderList);
/**
* 新增制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
public int insertWorkorderList(WorkorderList workorderList);
/**
* 修改制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
public int updateWorkorderList(WorkorderList workorderList);
/**
* 批量删除制工单子表列表
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWorkorderListByIds(String ids);
/**
* 删除制工单子表列表信息
*
* @param poId 制工单子表列表ID
* @return 结果
*/
public int deleteWorkorderListById(String poId);
}

65
ruoyi-admin/src/main/java/com/ruoyi/produce/service/IWorkorderheadService.java

@ -1,65 +0,0 @@
package com.ruoyi.produce.service;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.produce.domain.Workorderhead;
import java.util.List;
/**
* 制工Service接口
*
* @author ruoyi
* @date 2021-11-09
*/
public interface IWorkorderheadService
{
/**
* 查询制工
*
* @param poId 制工ID
* @return 制工
*/
public Workorderhead selectWorkorderheadById(String poId);
/**
* 查询制工列表
*
* @param workorderhead 制工
* @return 制工集合
*/
public List<Workorderhead> selectWorkorderheadList(Workorderhead workorderhead);
/**
* 新增制工
*
* @param workorderhead 制工
* @return 结果
*/
public int insertWorkorderhead(Workorderhead workorderhead)throws Exception;
/**
* 修改制工
*
* @param workorderhead 制工
* @return 结果
*/
public int updateWorkorderhead(Workorderhead workorderhead)throws Exception;
/**
* 批量删除制工
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWorkorderheadByIds(String ids);
/**
* 删除制工信息
*
* @param poId 制工ID
* @return 结果
*/
public int deleteWorkorderheadById(String poId);
public Result findCountByDay()throws Exception;
}

95
ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/WorkorderListServiceImpl.java

@ -1,95 +0,0 @@
package com.ruoyi.produce.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.produce.domain.WorkorderList;
import com.ruoyi.produce.mapper.WorkorderListMapper;
import com.ruoyi.produce.service.IWorkorderListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 制工单子表列表Service业务层处理
*
* @author ruoyi
* @date 2021-11-12
*/
@Service
public class WorkorderListServiceImpl implements IWorkorderListService
{
@Autowired
private WorkorderListMapper workorderListMapper;
/**
* 查询制工单子表列表
*
* @param poId 制工单子表列表ID
* @return 制工单子表列表
*/
@Override
public WorkorderList selectWorkorderListById(String poId)
{
return workorderListMapper.selectWorkorderListById(poId);
}
/**
* 查询制工单子表列表列表
*
* @param workorderList 制工单子表列表
* @return 制工单子表列表
*/
@Override
public List<WorkorderList> selectWorkorderListList(WorkorderList workorderList)
{
return workorderListMapper.selectWorkorderListList(workorderList);
}
/**
* 新增制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
@Override
public int insertWorkorderList(WorkorderList workorderList)
{
return workorderListMapper.insertWorkorderList(workorderList);
}
/**
* 修改制工单子表列表
*
* @param workorderList 制工单子表列表
* @return 结果
*/
@Override
public int updateWorkorderList(WorkorderList workorderList)
{
return workorderListMapper.updateWorkorderList(workorderList);
}
/**
* 删除制工单子表列表对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWorkorderListByIds(String ids)
{
return workorderListMapper.deleteWorkorderListByIds(Convert.toStrArray(ids));
}
/**
* 删除制工单子表列表信息
*
* @param poId 制工单子表列表ID
* @return 结果
*/
@Override
public int deleteWorkorderListById(String poId)
{
return workorderListMapper.deleteWorkorderListById(poId);
}
}

199
ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/WorkorderheadServiceImpl.java

@ -1,199 +0,0 @@
package com.ruoyi.produce.service.impl;
import com.ruoyi.ck.domain.Bom;
import com.ruoyi.ck.domain.Provider;
import com.ruoyi.ck.mapper.BomMapper;
import com.ruoyi.ck.mapper.ProviderMapper;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.produce.domain.WorkorderList;
import com.ruoyi.produce.domain.Workorderhead;
import com.ruoyi.produce.mapper.WorkorderListMapper;
import com.ruoyi.produce.mapper.WorkorderheadMapper;
import com.ruoyi.produce.service.IWorkorderheadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 制工Service业务层处理
*
* @author ruoyi
* @date 2021-11-09
*/
@Service
public class WorkorderheadServiceImpl implements IWorkorderheadService {
@Autowired
private WorkorderheadMapper workorderheadMapper;
@Autowired
private WorkorderListMapper workorderListMapper;
@Autowired
private ProviderMapper providerMapper;
@Autowired
private BomMapper bomMapper;
/**
* 查询制工
*
* @param poId 制工ID
* @return 制工
*/
@Override
public Workorderhead selectWorkorderheadById(String poId) {
return workorderheadMapper.selectWorkorderheadById(poId);
}
/**
* 查询制工列表
*
* @param workorderhead 制工
* @return 制工
*/
@Override
public List<Workorderhead> selectWorkorderheadList(Workorderhead workorderhead) {
return workorderheadMapper.selectWorkorderheadList(workorderhead);
}
/**
* 新增制工
*
* @param workorderhead 制工
* @return 结果
*/
@Override
public int insertWorkorderhead(Workorderhead workorderhead) throws Exception {
if (workorderhead.getEndFlag() == null) {
workorderhead.setEndFlag(0);
}
String workNo = workorderhead.getWorkNo();
workorderhead.setPoId(workNo);
Provider provider = new Provider();
provider.setpName(workorderhead.getpName());
List<Provider> providers = providerMapper.selectByItem(provider);
workorderhead.setpCode(providers.get(0).getpCode());
workorderhead.setWorkorderClass("生产工单");
workorderhead.setYlCpQty(workorderhead.getCpQty());
List<WorkorderList> workorderLists = workorderhead.getWorkorderLists();
workorderheadMapper.insertWorkorderhead(workorderhead);
addWorkOrderList(workorderLists, workorderhead);
return 1;
}
/**
* 修改制工
*
* @param workorderhead 制工
* @return 结果
*/
@Override
public int updateWorkorderhead(Workorderhead workorderhead)throws Exception {
String poId = workorderhead.getWorkNo();
Workorderhead tempWorkOrderHead = new Workorderhead();
tempWorkOrderHead.setPoNo(workorderhead.getPoNo());
List<Workorderhead> workorderheads = workorderheadMapper.selectWorkorderheadList(tempWorkOrderHead);
for (Workorderhead each : workorderheads) {
workorderListMapper.deleteWorkorderListById(each.getWorkNo());
}
//workorderListMapper.deleteWorkorderListById(poId);
Provider provider = new Provider();
provider.setpName(workorderhead.getpName());
List<Provider> providers = providerMapper.selectByItem(provider);
workorderhead.setPoDate(new Date());
workorderhead.setpCode(providers.get(0).getpCode());
List<WorkorderList> workorderLists = workorderhead.getWorkorderLists();
workorderheadMapper.updateWorkorderhead(workorderhead);
addWorkOrderList(workorderLists,workorderhead);
return 1;
}
/**
* 删除制工对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWorkorderheadByIds(String ids) {
return workorderheadMapper.deleteWorkorderheadByIds(Convert.toStrArray(ids));
}
/**
* 删除制工信息
*
* @param poId 制工ID
* @return 结果
*/
@Override
public int deleteWorkorderheadById(String poId) {
return workorderheadMapper.deleteWorkorderheadById(poId);
}
@Override
public Result findCountByDay() throws Exception {
int count = workorderheadMapper.selectCountByDay() + 1;
LocalDate now = LocalDate.now();
String s = now.toString().replaceAll("-", "");
String poId = "WO" + s;
if (count >= 100) {
poId += count;
} else if (count >= 10) {
poId += "0" + count;
} else {
poId += "00" + count;
}
return Result.getSuccessResult(poId);
}
//循环添加制工单子表
private void addWorkOrderList(List<WorkorderList> workorderLists, Workorderhead workorderhead) throws Exception {
Bom tempBom = new Bom();
Bom tempBom2 = new Bom();
List<WorkorderList> tempWorkOrderList = new ArrayList<>();
int tempNo = 1;
tempBom.setCpCode(workorderhead.getCpCode());
List<Bom> boms = bomMapper.selectBomList(tempBom);
for (WorkorderList workorderList : workorderLists) {
for (Bom bom : boms) {
if (bom.getWlCode().equals(workorderList.getWlCode())) {
workorderList.setPoId(workorderhead.getWorkNo());
workorderList.setPNO("" + tempNo);
workorderListMapper.insertWorkorderList(workorderList);
tempNo++;
break;
}
}
tempBom2.setCpCode(workorderList.getWlCode());
List<Bom> bomss = bomMapper.selectBomList(tempBom2);
if (bomss != null && bomss.size() > 0) {
Workorderhead newWorkorderhead = workorderhead.clone();
newWorkorderhead.setCpCode(workorderList.getWlCode());
newWorkorderhead.setCpName(workorderList.getItemname());
newWorkorderhead.setCpType(workorderList.getItemstandard());
newWorkorderhead.setCpDw(workorderList.getStockDw());
String data = (String) findCountByDay().getData();
newWorkorderhead.setPoId(data);
newWorkorderhead.setWorkNo(data);
workorderheadMapper.insertWorkorderhead(newWorkorderhead);
for (Bom eachBom : bomss) {
WorkorderList wol = new WorkorderList();
wol.setWlCode(eachBom.getWlCode());
wol.setItemname(eachBom.getItemname());
wol.setItemstandard(eachBom.getItemstandard());
wol.setStockDw(eachBom.getStockDw());
wol.setZpGuige(eachBom.getZpGuige());
wol.setMemoList(eachBom.getMemolist());
tempWorkOrderList.add(wol);
}
addWorkOrderList(tempWorkOrderList, newWorkorderhead);
}
}
}
}

165
ruoyi-admin/src/main/resources/mapper/produce/WorkorderListMapper.xml

@ -1,165 +0,0 @@
<?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.ruoyi.produce.mapper.WorkorderListMapper">
<resultMap type="WorkorderList" id="WorkorderListResult">
<result property="poId" column="PO_ID" />
<result property="PNO" column="PNO" />
<result property="wlCode" column="Wl_Code" />
<result property="itemname" column="Itemname" />
<result property="itemstandard" column="Itemstandard" />
<result property="stockDw" column="Stock_dw" />
<result property="Qty" column="Qty" />
<result property="Weight" column="Weight" />
<result property="MemoList" column="MemoList" />
<result property="OrderQty" column="OrderQty" />
<result property="qQty" column="Q_Qty" />
<result property="wldm" column="wldm" />
<result property="returnQty" column="Return_Qty" />
<result property="jaQty" column="JA_Qty" />
<result property="baseCode" column="base_code" />
<result property="fuWidth" column="fu_width" />
<result property="yflItemclass" column="YFL_ItemClass" />
<result property="mouldNo" column="Mould_No" />
<result property="tiaoNum" column="tiao_num" />
<result property="zpGuige" column="zp_guige" />
<result property="zpQty" column="zp_qty" />
<result property="llQty" column="LL_Qty" />
<result property="qLlQty" column="Q_LL_Qty" />
</resultMap>
<sql id="selectWorkorderListVo">
select PO_ID, PNO, Wl_Code, Itemname, Itemstandard, Stock_dw, Qty, Weight, MemoList, OrderQty, Q_Qty, wldm, Return_Qty, JA_Qty, base_code, fu_width, YFL_ItemClass, Mould_No, tiao_num, zp_guige, zp_qty, LL_Qty, Q_LL_Qty from workorder_list
</sql>
<select id="selectWorkorderListList" parameterType="WorkorderList" resultMap="WorkorderListResult">
<include refid="selectWorkorderListVo"/>
<where>
<if test="poId != null and poId != ''"> and PO_ID = #{poId}</if>
<if test="PNO != null and PNO != ''"> and PNO = #{PNO}</if>
<if test="wlCode != null and wlCode != ''"> and Wl_Code = #{wlCode}</if>
<if test="itemname != null and itemname != ''"> and Itemname like concat('%', #{itemname}, '%')</if>
<if test="itemstandard != null and itemstandard != ''"> and Itemstandard = #{itemstandard}</if>
<if test="stockDw != null and stockDw != ''"> and Stock_dw = #{stockDw}</if>
<if test="Qty != null "> and Qty = #{Qty}</if>
<if test="Weight != null "> and Weight = #{Weight}</if>
<if test="MemoList != null and MemoList != ''"> and MemoList = #{MemoList}</if>
<if test="OrderQty != null "> and OrderQty = #{OrderQty}</if>
<if test="qQty != null "> and Q_Qty = #{qQty}</if>
<if test="wldm != null and wldm != ''"> and wldm = #{wldm}</if>
<if test="returnQty != null "> and Return_Qty = #{returnQty}</if>
<if test="jaQty != null "> and JA_Qty = #{jaQty}</if>
<if test="baseCode != null and baseCode != ''"> and base_code = #{baseCode}</if>
<if test="fuWidth != null "> and fu_width = #{fuWidth}</if>
<if test="yflItemclass != null and yflItemclass != ''"> and YFL_ItemClass = #{yflItemclass}</if>
<if test="mouldNo != null and mouldNo != ''"> and Mould_No = #{mouldNo}</if>
<if test="tiaoNum != null "> and tiao_num = #{tiaoNum}</if>
<if test="zpGuige != null and zpGuige != ''"> and zp_guige = #{zpGuige}</if>
<if test="zpQty != null "> and zp_qty = #{zpQty}</if>
<if test="llQty != null "> and LL_Qty = #{llQty}</if>
<if test="qLlQty != null "> and Q_LL_Qty = #{qLlQty}</if>
</where>
</select>
<select id="selectWorkorderListById" parameterType="String" resultMap="WorkorderListResult">
<include refid="selectWorkorderListVo"/>
where PO_ID = #{poId}
</select>
<insert id="insertWorkorderList" parameterType="WorkorderList">
insert into workorder_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="poId != null and poId != ''">PO_ID,</if>
<if test="PNO != null">PNO,</if>
<if test="wlCode != null">Wl_Code,</if>
<if test="itemname != null">Itemname,</if>
<if test="itemstandard != null">Itemstandard,</if>
<if test="stockDw != null">Stock_dw,</if>
<if test="Qty != null">Qty,</if>
<if test="Weight != null">Weight,</if>
<if test="MemoList != null">MemoList,</if>
<if test="OrderQty != null">OrderQty,</if>
<if test="qQty != null">Q_Qty,</if>
<if test="wldm != null">wldm,</if>
<if test="returnQty != null">Return_Qty,</if>
<if test="jaQty != null">JA_Qty,</if>
<if test="baseCode != null">base_code,</if>
<if test="fuWidth != null">fu_width,</if>
<if test="yflItemclass != null">YFL_ItemClass,</if>
<if test="mouldNo != null">Mould_No,</if>
<if test="tiaoNum != null">tiao_num,</if>
<if test="zpGuige != null">zp_guige,</if>
<if test="zpQty != null">zp_qty,</if>
<if test="llQty != null">LL_Qty,</if>
<if test="qLlQty != null">Q_LL_Qty,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="poId != null and poId != ''">#{poId},</if>
<if test="PNO != null">#{PNO},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="itemname != null">#{itemname},</if>
<if test="itemstandard != null">#{itemstandard},</if>
<if test="stockDw != null">#{stockDw},</if>
<if test="Qty != null">#{Qty},</if>
<if test="Weight != null">#{Weight},</if>
<if test="MemoList != null">#{MemoList},</if>
<if test="OrderQty != null">#{OrderQty},</if>
<if test="qQty != null">#{qQty},</if>
<if test="wldm != null">#{wldm},</if>
<if test="returnQty != null">#{returnQty},</if>
<if test="jaQty != null">#{jaQty},</if>
<if test="baseCode != null">#{baseCode},</if>
<if test="fuWidth != null">#{fuWidth},</if>
<if test="yflItemclass != null">#{yflItemclass},</if>
<if test="mouldNo != null">#{mouldNo},</if>
<if test="tiaoNum != null">#{tiaoNum},</if>
<if test="zpGuige != null">#{zpGuige},</if>
<if test="zpQty != null">#{zpQty},</if>
<if test="llQty != null">#{llQty},</if>
<if test="qLlQty != null">#{qLlQty},</if>
</trim>
</insert>
<update id="updateWorkorderList" parameterType="WorkorderList">
update workorder_list
<trim prefix="SET" suffixOverrides=",">
<if test="PNO != null">PNO = #{PNO},</if>
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
<if test="itemname != null">Itemname = #{itemname},</if>
<if test="itemstandard != null">Itemstandard = #{itemstandard},</if>
<if test="stockDw != null">Stock_dw = #{stockDw},</if>
<if test="Qty != null">Qty = #{Qty},</if>
<if test="Weight != null">Weight = #{Weight},</if>
<if test="MemoList != null">MemoList = #{MemoList},</if>
<if test="OrderQty != null">OrderQty = #{OrderQty},</if>
<if test="qQty != null">Q_Qty = #{qQty},</if>
<if test="wldm != null">wldm = #{wldm},</if>
<if test="returnQty != null">Return_Qty = #{returnQty},</if>
<if test="jaQty != null">JA_Qty = #{jaQty},</if>
<if test="baseCode != null">base_code = #{baseCode},</if>
<if test="fuWidth != null">fu_width = #{fuWidth},</if>
<if test="yflItemclass != null">YFL_ItemClass = #{yflItemclass},</if>
<if test="mouldNo != null">Mould_No = #{mouldNo},</if>
<if test="tiaoNum != null">tiao_num = #{tiaoNum},</if>
<if test="zpGuige != null">zp_guige = #{zpGuige},</if>
<if test="zpQty != null">zp_qty = #{zpQty},</if>
<if test="llQty != null">LL_Qty = #{llQty},</if>
<if test="qLlQty != null">Q_LL_Qty = #{qLlQty},</if>
</trim>
where PO_ID = #{poId}
</update>
<delete id="deleteWorkorderListById" parameterType="String">
delete from workorder_list where PO_ID = #{poId}
</delete>
<delete id="deleteWorkorderListByIds" parameterType="String">
delete from workorder_list where PO_ID in
<foreach item="poId" collection="array" open="(" separator="," close=")">
#{poId}
</foreach>
</delete>
</mapper>

227
ruoyi-admin/src/main/resources/mapper/produce/WorkorderheadMapper.xml

@ -1,227 +0,0 @@
<?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.ruoyi.produce.mapper.WorkorderheadMapper">
<resultMap type="Workorderhead" id="WorkorderheadResult">
<result property="poId" column="PO_ID" />
<result property="poNo" column="PO_NO" />
<result property="workNo" column="Work_NO" />
<result property="piNo" column="PI_NO" />
<result property="pCode" column="P_CODE" />
<result property="pName" column="P_Name" />
<result property="beginDate" column="Begin_date" />
<result property="endDate" column="End_date" />
<result property="poDate" column="PO_date" />
<result property="sendDate" column="Send_date" />
<result property="workorderClass" column="workorder_Class" />
<result property="cpCode" column="CP_CODE" />
<result property="cpName" column="CP_NAME" />
<result property="cpType" column="CP_TYPE" />
<result property="cpMachineno" column="CP_MachineNO" />
<result property="cpDw" column="CP_DW" />
<result property="cpQty" column="CP_QTY" />
<result property="ylCpQty" column="YL_CP_QTY" />
<result property="cpInQty" column="CP_IN_QTY" />
<result property="qdQty" column="QD_QTY" />
<result property="bzMemo" column="BZ_memo" />
<result property="endFlag" column="End_flag" />
<result property="chinaInOrOut" column="China_in_or_out" />
<result property="isDelete" column="Is_delete" />
<result property="cpwldm" column="cpwldm" />
<result property="nowcpstockqty" column="nowcpstockqty" />
<result property="NWX" column="NWX" />
<result property="haveprint" column="haveprint" />
<result property="bomVersionNo" column="BOM_Version_NO" />
<result property="badQty" column="BAD_QTY" />
<result property="jaMan" column="ja_man" />
<result property="jaTime" column="ja_time" />
<result property="department" column="department" />
<result property="cpWeizhi" column="CP_Weizhi" />
<result property="mjWeizhi" column="MJ_Weizhi" />
<result property="versionNo" column="Version_NO" />
<result property="Factory" column="Factory" />
<result property="madeQty" column="Made_Qty" />
<result property="qMadeQty" column="Q_Made_Qty" />
</resultMap>
<sql id="selectWorkorderheadVo">
select PO_ID, PO_NO, Work_NO, PI_NO, P_CODE, P_Name, Begin_date, End_date, PO_date, Send_date, workorder_Class, CP_CODE, CP_NAME, CP_TYPE, CP_MachineNO, CP_DW, CP_QTY, YL_CP_QTY, CP_IN_QTY, QD_QTY, BZ_memo, End_flag, China_in_or_out, Is_delete, cpwldm, nowcpstockqty, NWX, haveprint, BOM_Version_NO, BAD_QTY, ja_man, ja_time, department, CP_Weizhi, MJ_Weizhi, Version_NO, Factory, Made_Qty, Q_Made_Qty from workorderhead
</sql>
<select id="selectWorkorderheadList" parameterType="Workorderhead" resultMap="WorkorderheadResult">
<include refid="selectWorkorderheadVo"/>
<where>
<if test="poId != null and poId != ''"> and PO_ID like concat('%', #{poId}, '%')</if>
<!-- <if test="poNo != null and poNo != ''"> and PO_NO like concat('%', #{poNo}, '%')</if>-->
<if test="poNo != null and poNo != ''"> and PO_NO = #{poNo}</if>
<if test="pName != null and pName != ''"> and P_Name like concat('%', #{pName}, '%')</if>
<!-- <if test="params.beginPoDate != null and params.beginPoDate != '' and params.endPoDate != null and params.endPoDate != ''"> and PO_date between #{params.beginPoDate} and #{params.endPoDate}</if>-->
<!-- <if test="params.beginSendDate != null and params.beginSendDate != '' and params.endSendDate != null and params.endSendDate != ''"> and Send_date between #{params.beginSendDate} and #{params.endSendDate}</if>-->
<if test="params.beginPoDate != null and params.beginPoDate !=''"> and PO_date >= #{params.beginPoDate}</if>
<if test="params.endPoDate != null and params.endPoDate != ''">and #{params.endPoDate} >= PO_date</if>
<if test="params.beginSendDate != null and params.beginSendDate !=''"> and Send_date >= #{params.beginSendDate}</if>
<if test="params.endSendDate != null and params.endSendDate != ''">and #{params.endSendDate} >= Send_date</if>
<if test="workorderClass != null and workorderClass != ''"> and workorder_Class = #{workorderClass}</if>
<if test="cpCode != null and cpCode != ''"> and CP_CODE like concat('%', #{cpCode}, '%')</if>
<if test="cpName != null and cpName != ''"> and CP_NAME like concat('%', #{cpName}, '%')</if>
<if test="endFlag != null and endFlag != ''"> and End_flag = #{endFlag}</if>
<if test="NWX != null and NWX != ''"> and NWX = #{NWX}</if>
<if test="department != null and department != ''"> and department = #{department}</if>
</where>
</select>
<select id="selectWorkorderheadById" parameterType="String" resultMap="WorkorderheadResult">
<include refid="selectWorkorderheadVo"/>
where PO_ID = #{poId}
</select>
<insert id="insertWorkorderhead" parameterType="Workorderhead">
insert into workorderhead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="poId != null and poId != ''">PO_ID,</if>
<if test="poNo != null">PO_NO,</if>
<if test="workNo != null and workNo != ''">Work_NO,</if>
<if test="piNo != null and piNo != ''">PI_NO,</if>
<if test="pCode != null and pCode != ''">P_CODE,</if>
<if test="pName != null">P_Name,</if>
<if test="beginDate != null">Begin_date,</if>
<if test="endDate != null">End_date,</if>
<if test="poDate != null">PO_date,</if>
<if test="sendDate != null">Send_date,</if>
<if test="workorderClass != null and workorderClass != ''">workorder_Class,</if>
<if test="cpCode != null and cpCode != ''">CP_CODE,</if>
<if test="cpName != null">CP_NAME,</if>
<if test="cpType != null">CP_TYPE,</if>
<if test="cpMachineno != null">CP_MachineNO,</if>
<if test="cpDw != null">CP_DW,</if>
<if test="cpQty != null">CP_QTY,</if>
<if test="ylCpQty != null">YL_CP_QTY,</if>
<if test="cpInQty != null">CP_IN_QTY,</if>
<if test="qdQty != null">QD_QTY,</if>
<if test="bzMemo != null">BZ_memo,</if>
<if test="endFlag != null">End_flag,</if>
<if test="chinaInOrOut != null">China_in_or_out,</if>
<if test="isDelete != null">Is_delete,</if>
<if test="cpwldm != null">cpwldm,</if>
<if test="nowcpstockqty != null">nowcpstockqty,</if>
<if test="NWX != null">NWX,</if>
<if test="haveprint != null">haveprint,</if>
<if test="bomVersionNo != null">BOM_Version_NO,</if>
<if test="badQty != null">BAD_QTY,</if>
<if test="jaMan != null">ja_man,</if>
<if test="jaTime != null">ja_time,</if>
<if test="department != null">department,</if>
<if test="cpWeizhi != null">CP_Weizhi,</if>
<if test="mjWeizhi != null">MJ_Weizhi,</if>
<if test="versionNo != null">Version_NO,</if>
<if test="Factory != null">Factory,</if>
<if test="madeQty != null">Made_Qty,</if>
<if test="qMadeQty != null">Q_Made_Qty,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="poId != null and poId != ''">#{poId},</if>
<if test="poNo != null">#{poNo},</if>
<if test="workNo != null and workNo != ''">#{workNo},</if>
<if test="piNo != null and piNo != ''">#{piNo},</if>
<if test="pCode != null and pCode != ''">#{pCode},</if>
<if test="pName != null">#{pName},</if>
<if test="beginDate != null">#{beginDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="poDate != null">#{poDate},</if>
<if test="sendDate != null">#{sendDate},</if>
<if test="workorderClass != null and workorderClass != ''">#{workorderClass},</if>
<if test="cpCode != null and cpCode != ''">#{cpCode},</if>
<if test="cpName != null">#{cpName},</if>
<if test="cpType != null">#{cpType},</if>
<if test="cpMachineno != null">#{cpMachineno},</if>
<if test="cpDw != null">#{cpDw},</if>
<if test="cpQty != null">#{cpQty},</if>
<if test="ylCpQty != null">#{ylCpQty},</if>
<if test="cpInQty != null">#{cpInQty},</if>
<if test="qdQty != null">#{qdQty},</if>
<if test="bzMemo != null">#{bzMemo},</if>
<if test="endFlag != null">#{endFlag},</if>
<if test="chinaInOrOut != null">#{chinaInOrOut},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="cpwldm != null">#{cpwldm},</if>
<if test="nowcpstockqty != null">#{nowcpstockqty},</if>
<if test="NWX != null">#{NWX},</if>
<if test="haveprint != null">#{haveprint},</if>
<if test="bomVersionNo != null">#{bomVersionNo},</if>
<if test="badQty != null">#{badQty},</if>
<if test="jaMan != null">#{jaMan},</if>
<if test="jaTime != null">#{jaTime},</if>
<if test="department != null">#{department},</if>
<if test="cpWeizhi != null">#{cpWeizhi},</if>
<if test="mjWeizhi != null">#{mjWeizhi},</if>
<if test="versionNo != null">#{versionNo},</if>
<if test="Factory != null">#{Factory},</if>
<if test="madeQty != null">#{madeQty},</if>
<if test="qMadeQty != null">#{qMadeQty},</if>
</trim>
</insert>
<update id="updateWorkorderhead" parameterType="Workorderhead">
update workorderhead
<trim prefix="SET" suffixOverrides=",">
<if test="poNo != null">PO_NO = #{poNo},</if>
<if test="workNo != null and workNo != ''">Work_NO = #{workNo},</if>
<if test="piNo != null and piNo != ''">PI_NO = #{piNo},</if>
<if test="pCode != null and pCode != ''">P_CODE = #{pCode},</if>
<if test="pName != null">P_Name = #{pName},</if>
<if test="beginDate != null">Begin_date = #{beginDate},</if>
<if test="endDate != null">End_date = #{endDate},</if>
<if test="poDate != null">PO_date = #{poDate},</if>
<if test="sendDate != null">Send_date = #{sendDate},</if>
<if test="workorderClass != null and workorderClass != ''">workorder_Class = #{workorderClass},</if>
<if test="cpCode != null and cpCode != ''">CP_CODE = #{cpCode},</if>
<if test="cpName != null">CP_NAME = #{cpName},</if>
<if test="cpType != null">CP_TYPE = #{cpType},</if>
<if test="cpMachineno != null">CP_MachineNO = #{cpMachineno},</if>
<if test="cpDw != null">CP_DW = #{cpDw},</if>
<if test="cpQty != null">CP_QTY = #{cpQty},</if>
<if test="ylCpQty != null">YL_CP_QTY = #{ylCpQty},</if>
<if test="cpInQty != null">CP_IN_QTY = #{cpInQty},</if>
<if test="qdQty != null">QD_QTY = #{qdQty},</if>
<if test="bzMemo != null">BZ_memo = #{bzMemo},</if>
<if test="endFlag != null">End_flag = #{endFlag},</if>
<if test="chinaInOrOut != null">China_in_or_out = #{chinaInOrOut},</if>
<if test="isDelete != null">Is_delete = #{isDelete},</if>
<if test="cpwldm != null">cpwldm = #{cpwldm},</if>
<if test="nowcpstockqty != null">nowcpstockqty = #{nowcpstockqty},</if>
<if test="NWX != null">NWX = #{NWX},</if>
<if test="haveprint != null">haveprint = #{haveprint},</if>
<if test="bomVersionNo != null">BOM_Version_NO = #{bomVersionNo},</if>
<if test="badQty != null">BAD_QTY = #{badQty},</if>
<if test="jaMan != null">ja_man = #{jaMan},</if>
<if test="jaTime != null">ja_time = #{jaTime},</if>
<if test="department != null">department = #{department},</if>
<if test="cpWeizhi != null">CP_Weizhi = #{cpWeizhi},</if>
<if test="mjWeizhi != null">MJ_Weizhi = #{mjWeizhi},</if>
<if test="versionNo != null">Version_NO = #{versionNo},</if>
<if test="Factory != null">Factory = #{Factory},</if>
<if test="madeQty != null">Made_Qty = #{madeQty},</if>
<if test="qMadeQty != null">Q_Made_Qty = #{qMadeQty},</if>
</trim>
where PO_ID = #{poId}
</update>
<delete id="deleteWorkorderheadById" parameterType="String">
delete from workorderhead where PO_ID = #{poId}
</delete>
<delete id="deleteWorkorderheadByIds" parameterType="String">
delete from workorderhead where PO_ID in
<foreach item="poId" collection="array" open="(" separator="," close=")">
#{poId}
</foreach>
</delete>
<select id="selectCountByDay" resultType="Integer">
select count(*) from workorderhead where to_days(PO_date)=to_days(now())
</select>
</mapper>

163
ruoyi-admin/src/main/resources/templates/produce/list/add.html

@ -1,163 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增制工单子表列表')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-list-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="poId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="PNO" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="wlCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemname" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemstandard" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="stockDw" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Qty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Weight" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<textarea name="MemoList" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="OrderQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="qQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="wldm" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="returnQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="jaQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="baseCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="fuWidth" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="yflItemclass" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="mouldNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="tiaoNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="zpGuige" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="zpQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="llQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="qLlQty" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "produce/list"
$("#form-list-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-list-add').serialize());
}
}
</script>
</body>
</html>

164
ruoyi-admin/src/main/resources/templates/produce/list/edit.html

@ -1,164 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改制工单子表列表')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-list-edit" th:object="${workorderList}">
<input name="poId" th:field="*{poId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="poId" th:field="*{poId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="PNO" th:field="*{PNO}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="wlCode" th:field="*{wlCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemname" th:field="*{Itemname}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemstandard" th:field="*{Itemstandard}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="stockDw" th:field="*{stockDw}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Qty" th:field="*{Qty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Weight" th:field="*{Weight}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<textarea name="MemoList" class="form-control">[[*{MemoList}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="OrderQty" th:field="*{OrderQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="qQty" th:field="*{qQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="wldm" th:field="*{wldm}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="returnQty" th:field="*{returnQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="jaQty" th:field="*{jaQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="baseCode" th:field="*{baseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="fuWidth" th:field="*{fuWidth}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="yflItemclass" th:field="*{yflItemclass}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="mouldNo" th:field="*{mouldNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="tiaoNum" th:field="*{tiaoNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="zpGuige" th:field="*{zpGuige}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="zpQty" th:field="*{zpQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="llQty" th:field="*{llQty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="qLlQty" th:field="*{qLlQty}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "produce/list";
$("#form-list-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-list-edit').serialize());
}
}
</script>
</body>
</html>

253
ruoyi-admin/src/main/resources/templates/produce/list/list.html

@ -1,253 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('制工单子表列表列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label></label>
<input type="text" name="poId"/>
</li>
<li>
<label></label>
<input type="text" name="PNO"/>
</li>
<li>
<label></label>
<input type="text" name="wlCode"/>
</li>
<li>
<label></label>
<input type="text" name="Itemname"/>
</li>
<li>
<label></label>
<input type="text" name="Itemstandard"/>
</li>
<li>
<label></label>
<input type="text" name="stockDw"/>
</li>
<li>
<label></label>
<input type="text" name="Qty"/>
</li>
<li>
<label></label>
<input type="text" name="Weight"/>
</li>
<li>
<label></label>
<input type="text" name="OrderQty"/>
</li>
<li>
<label></label>
<input type="text" name="qQty"/>
</li>
<li>
<label></label>
<input type="text" name="wldm"/>
</li>
<li>
<label></label>
<input type="text" name="returnQty"/>
</li>
<li>
<label></label>
<input type="text" name="jaQty"/>
</li>
<li>
<label></label>
<input type="text" name="baseCode"/>
</li>
<li>
<label></label>
<input type="text" name="fuWidth"/>
</li>
<li>
<label></label>
<input type="text" name="yflItemclass"/>
</li>
<li>
<label></label>
<input type="text" name="mouldNo"/>
</li>
<li>
<label></label>
<input type="text" name="tiaoNum"/>
</li>
<li>
<label></label>
<input type="text" name="zpGuige"/>
</li>
<li>
<label></label>
<input type="text" name="zpQty"/>
</li>
<li>
<label></label>
<input type="text" name="llQty"/>
</li>
<li>
<label></label>
<input type="text" name="qLlQty"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="produce:list:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="produce:list:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="produce:list:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="produce:list:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('produce:list:edit')}]];
var removeFlag = [[${@permission.hasPermi('produce:list:remove')}]];
var prefix = ctx + "produce/list";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "制工单子表列表",
columns: [{
checkbox: true
},
{
field: 'poId',
title: ''
},
{
field: 'PNO',
title: ''
},
{
field: 'wlCode',
title: ''
},
{
field: 'Itemname',
title: ''
},
{
field: 'Itemstandard',
title: ''
},
{
field: 'stockDw',
title: ''
},
{
field: 'Qty',
title: ''
},
{
field: 'Weight',
title: ''
},
{
field: 'MemoList',
title: ''
},
{
field: 'OrderQty',
title: ''
},
{
field: 'qQty',
title: ''
},
{
field: 'wldm',
title: ''
},
{
field: 'returnQty',
title: ''
},
{
field: 'jaQty',
title: ''
},
{
field: 'baseCode',
title: ''
},
{
field: 'fuWidth',
title: ''
},
{
field: 'yflItemclass',
title: ''
},
{
field: 'mouldNo',
title: ''
},
{
field: 'tiaoNum',
title: ''
},
{
field: 'zpGuige',
title: ''
},
{
field: 'zpQty',
title: ''
},
{
field: 'llQty',
title: ''
},
{
field: 'qLlQty',
title: ''
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.poId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.poId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

1001
ruoyi-admin/src/main/resources/templates/produce/workorderhead/add.html

File diff suppressed because it is too large

916
ruoyi-admin/src/main/resources/templates/produce/workorderhead/edit.html

@ -1,916 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改制工')" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-workorderhead-edit" th:object="${workorderhead}">
<input name="poId" th:field="*{poId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单号:</label>
<div class="col-sm-8">
<input name="poNo" th:field="*{poNo}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">#line:</label>
<div class="col-sm-8">
<input name="piNo" th:field="*{piNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">工单号:</label>
<div class="col-sm-8">
<input name="workNo" th:field="*{workNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8">
<select name="pName" class="form-control m-b">
<option value="-1">--请选择--</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户代码:</label>
<div class="col-sm-8">
<select name="pCode" class="form-control m-b" disabled>
<option value="-1">--请选择--</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成品代码:</label>
<div class="col-sm-8">
<input name="cpCode" th:field="*{cpCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成品名称:</label>
<div class="col-sm-8">
<input name="cpName" type="text" class="form-control" th:field="*{cpName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开工日期:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="beginDate" th:value="${#dates.format(workorderhead.beginDate, 'yyyy-MM-dd')}" class="form-control time-input" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">完工日期:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="endDate" th:value="${#dates.format(workorderhead.endDate, 'yyyy-MM-dd')}" class="form-control time-input" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开单日期:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="poDate" th:value="${#dates.format(workorderhead.poDate, 'yyyy-MM-dd')}" class="form-control time-input" placeholder="yyyy-MM-dd" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">交货日期:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="sendDate" th:value="${#dates.format(workorderhead.sendDate, 'yyyy-MM-dd')}" class="form-control time-input" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="cpType" th:field="*{cpType}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">机种:</label>
<div class="col-sm-8">
<input type="text" name="cpMachineno" class="form-control" th:field="*{cpMachineno}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="cpDw" th:field="*{cpDw}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单数量:</label>
<div class="col-sm-8">
<input name="cpQty" th:field="*{cpQty}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">投单数量:</label>
<div class="col-sm-8">
<input name="ylCpQty" th:field="*{ylCpQty}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成品版本号:</label>
<div class="col-sm-8">
<input name="versionNo" th:field="*{versionNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户厂区:</label>
<div class="col-sm-8">
<input name="Factory" th:field="*{Factory}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<textarea name="bzMemo" class="form-control">[[*{bzMemo}]]</textarea>
</div>
</div>
</form>
</div>
<div class="col-sm-12">
<label>版本号:</label>
<input type="text" name="versionNo" class="form-control" placeholder="请输入版本号" style="margin-bottom: 15px">
<button type="button" class="btn btn-success" id="bomTableSearch">搜索</button>
<button type="button" class="btn btn-success" onclick="bomTableReset()">重置</button>
<div class="col-sm-12 select-table table-striped" style="padding-bottom: 100px;">
<table id="bootstrap-table"></table>
</div>
</div>
<div class="col-sm-12" style="text-align: center">
<button type="button" class="btn btn-success" style="margin-top: 20px"
onclick="addBom()">确定
</button>
</div>
<div class="col-sm-12 select-table table-striped" style="padding-bottom: 100px;">
<table id="selectBomTable"></table>
</div>
<!--弹出框-->
<div class="modal inmodal" id="saleOrderModal" tabindex="-1"
role="dilog" aria-hidden="true" style="padding-bottom: 100px;">
<div class="modal-dialog" style="width: 800px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h4 class="modal-title">选择订单</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div class="row">
<div class="col-md-5">
<form id="saleOrderForm" class="form-group">
<label class="control-label col-md-4">订单号:</label>
<div class="col-md-8">
<input type="text" class="form-control" name="SaleorderNO"
id="SaleorderNO">
</div>
</form>
</div>
<div class="col-md-2">
<button type="button" class="btn btn-success" id="saleOrderNoSearch">搜索</button>
</div>
<div class="col-md-2">
<button type="button" class="btn btn-success" id="reset" onclick="reset()">重置</button>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table id="saleOrderTable"
class="table table-striped table-responsive" style="padding-bottom: 50px;">
</table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary"
onClick="confirm();">确定
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "produce/workorderhead";
$("#form-workorderhead-edit").validate({
focusCleanup: true
});
function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/edit", $('#form-workorderhead-edit').serialize());
// }
submit();
}
function submit() {
let selectBomTable = $("#selectBomTable").bootstrapTable("getData", true);
let formData = new FormData($("#form-workorderhead-edit")[0]);
formData.append("workorderLists", JSON.stringify(selectBomTable));
let data = {};
formData.forEach((value, key) => data[key] = value);
//alert(JSON.stringify(data));
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: {"jsonStr": JSON.stringify(data)},
success: function (resp) {
if (resp.code === 0) {
alert("修改成功!");
//window.location.href = prefix;
var index = parent.layer.getFrameIndex(window.name);
var parent2 = window.parent;
parent2.$.table.refresh();
parent.layer.close(index);//关闭当前页
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
//鼠标移入,显示完整的数据
function paramsMatter(value, row, index) {
var span = document.createElement("span");
span.setAttribute("title", value);
span.innerHTML = value;
return span.outerHTML;
}
let getData = [[${workorderhead}]];
//获取客户代码和名称
$.ajax({
url: ctx + "finance/customer/getName",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
if (resp.data.length > 0) {
$("select[name='pName']").empty();
$("select[name='pCode']").empty();
let data = resp.data;
//alert(data);
for (let i in data) {
$("select[name='pName']").append("<option value='" + data[i].pName + "'>" + data[i].pName + "</option>");
$("select[name='pCode']").append("<option value='" + data[i].pCode + "'>" + data[i].pCode + "</option>");
}
$("select[name='pName']").val(getData.pName).trigger("change");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
})
//更改客户名称时改变客户代码
$("select[name='pName']").change(function () {
let pName = $(this).val();
$.ajax({
url: ctx + "finance/customer/item",
type: "post",
dataType: "json",
data: {"pName": pName},
success: function (resp) {
if (resp.code === 0) {
$("select[name='pCode']").val(resp.data[0].pCode).trigger("change");
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
})
})
//显示弹层
$("input[name='poNo']").on("click", function () {
$("#saleOrderModal").modal("show");
})
//重置
function reset() {
$("#SaleorderNO").val("");
$("#saleOrderTable").bootstrapTable("refresh");
}
//搜索销售列表
$("#saleOrderNoSearch").on("click", function () {
$("#saleOrderTable").bootstrapTable("refresh");
})
//bom表格重置
function bomTableReset() {
//$("#bootstrap-table").innerHtml("");
$("#bootstrap-table").bootstrapTable("removeAll");
$("input[name='versionNo']").val("");
selectDataToBom(wlCode);
}
//搜索bom表格
$("#bomTableSearch").on("click", function () {
$("#bootstrap-table").bootstrapTable("removeAll");
selectDataToBom(wlCode);
})
//点击选中销售订单
let wlCode = null;
//进去展示bom数据
wlCode = $("input[name='cpCode']").val()
selectDataToBom(wlCode);
//进去展示制工单子表数据
function showWorkOrderList(){
let poId=$("input[name='workNo']").val();
$.ajax({
url:ctx+"produce/list/getList",
type:"post",
dataType:"json",
data:{"poId":poId},
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
let count = $('#selectBomTable').bootstrapTable('getData').length;
for (let i in data) {
$("#selectBomTable").bootstrapTable('insertRow', {
index: count + i,
row: {
versionNo: data[i].versionNo,
wlCode: data[i].wlCode,
itemname: data[i].itemname,
itemstandard: data[i].itemstandard,
useNum: data[i].useNum,
lostpre: data[i].lostpre,
zpGuige: data[i].zpGuige,
memolist: data[i].memoList,
stockDw: data[i].stockDw
}
});
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
})
}
showWorkOrderList();
function confirm() {
$("#bootstrap-table").bootstrapTable("removeAll");
let row = $("#saleOrderTable").bootstrapTable("getSelections");
//alert(JSON.stringify(row));
if (row.length != 0) {
$("input[name='poNo']").val(row[0].saleorderNO);
$("input[name='piNo']").val(row[0].piNo);
$("input[name='sendDate']").val(row[0].sendDate);
$("select[name='pName']").val(row[0].pName).trigger("change");
$("input[name='cpCode']").val(row[0].wlCode);
$("input[name='cpName']").val(row[0].itemname);
$("input[name='Factory']").val(row[0].factory);
$("input[name='cpQty']").val(parseInt(row[0].qty) - parseInt(row[0].orderQty));
$.ajax({
url: ctx + "finance/saleorderlist/item",
type: "post",
dataType: "json",
data: {"SaleOrderID": row[0].saleorderNO, "wlCode": row[0].wlCode},
async: false,
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
//alert(JSON.stringify(data));
$("input[name='cpType']").val(data[0].itemstandard);
$("input[name='cpMachineno']").val(data[0].machineNo);
$("input[name='cpDw']").val(data[0].stockDw);
wlCode = data[0].wlCode;
selectDataToBom(wlCode);
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
});
reset();
}
$("#saleOrderModal").modal("hide");
}
//将选中的bom引入待确认bom表格
function addBom() {
let row = $("#bootstrap-table").bootstrapTable("getSelections");
let count = $('#selectBomTable').bootstrapTable('getData').length;
for (let i = 0; i < row.length; i++) {
let bootstrapTable = $("#selectBomTable").bootstrapTable("getRowByUniqueId", row[i].zpGuige);
//alert(bootstrapTable);
if (bootstrapTable != null) {
alert("供应商料号" + bootstrapTable.zpGuige + "已存在!");
continue;
}
$("#selectBomTable").bootstrapTable('insertRow', {
index: count + i,
row: {
wlCode: row[i].wlCode,
itemname: row[i].itemname,
itemstandard: row[i].itemstandard,
stockDw: row[i].stockDw,
useNum: 0,
zpGuige: row[i].zpGuige,
memolist: row[i].memolist
}
});
}
bomTableReset();
}
//将查询到的数据放入bom表格
function selectDataToBom(wlCode) {
let versionNo = $("#versionNo").val();
//alert(versionNo);
$.ajax({
url: ctx + "ck/bom/list",
type: "post",
dataType: "json",
data: {"versionNo": versionNo, "cpCode": wlCode},
success: function (resp) {
if (resp.code === 0) {
let data = resp.rows;
let count = $('#bootstrap-table').bootstrapTable('getData').length;
for (let i in data) {
$("#bootstrap-table").bootstrapTable('insertRow', {
index: count + i,
row: {
versionNo: data[i].versionNo,
wlCode: data[i].wlCode,
itemname: data[i].itemname,
itemstandard: data[i].itemstandard,
useNum: data[i].useNum,
lostpre: data[i].lostpre,
zpGuige: data[i].zpGuige,
memolist: data[i].memolist,
stockDw: data[i].stockDw,
bomHierarchy: data[i].bomHierarchy
}
});
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
})
}
//移除待提交bom表格的对应行数据
function remove(zpGuige) {
$("#selectBomTable").bootstrapTable("remove", {
field: 'zpGuige',
values: zpGuige
});
}
//bom表格
$('#bootstrap-table').bootstrapTable({
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
// contentType :"application/x-www-form-urlencoded",
// pageNumber : 1, // 初始化加载第一页,默认第一页
// pageSize : 10, // 每页的记录行数(*)
// pageList : [ 5, 10,50], // 可供选择的每页的行数(*)
// clickToSelect : true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
// singleSelect: true,
height: 400,
columns: [{
checkbox: true
},
{
field: 'bomHierarchy',
title: 'bom阶',
// visible: false
},
{
field: 'versionNo',
title: '版本号',
// visible: false
},
{
field: 'wlCode',
title: '原料基本码',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'itemname',
title: '原料名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'cpCode',
title: '成品代码',
visible: false
},
{
field: 'cpName',
title: '成品名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter,
visible: false
},
{
field: 'itemstandard',
title: '规格型号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'stockDw',
title: '单位'
},
{
field: 'useNum',
title: '使用量'
},
{
field: 'lostpre',
title: '损耗'
},
{
field: 'zpGuige',
title: '供应商料号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'memolist',
title: '说明',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
]
});
//待提交bom表格
$('#selectBomTable').bootstrapTable({
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
// contentType :"application/x-www-form-urlencoded",
// pageNumber : 1, // 初始化加载第一页,默认第一页
// pageSize : 10, // 每页的记录行数(*)
// pageList : [ 5, 10,50], // 可供选择的每页的行数(*)
// clickToSelect : true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
height: 400,
uniqueId: 'zpGuige',
columns: [{
checkbox: false
},
{
field: 'versionNo',
title: '版本号',
visible: false
},
{
field: 'wlCode',
title: '原料代码',
},
{
field: 'itemname',
title: '原料名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'itemstandard',
title: '规格型号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'stockDw',
title: '单位'
},
{
field: 'useNum',
title: '使用量'
},
{
field: 'lostpre',
title: '损耗',
visible: false
},
{
field: 'zpGuige',
title: '供应商料号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'memolist',
title: '说明',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
let actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit()"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="remove(\'' + row.zpGuige + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}
]
});
//弹层订单列表
$('#saleOrderTable').bootstrapTable({
url: ctx + "finance/lsalesOrder/list",
method: 'post',
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
pagination: true, // 是否显示分页(*)
contentType: "application/x-www-form-urlencoded",
queryParams: function (params) {
let curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1
// searchValue: params.search,
// orderByColumn: params.sort,
// isAsc: params.order
};
let saleOrderNO = $("#SaleorderNO").val();
//alert(wlCode);
let json = $.extend(curParams, {"SaleorderNO": saleOrderNO});
return json;
},
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: 5, // 每页的记录行数(*)
pageList: [5, 10, 50], // 可供选择的每页的行数(*)
clickToSelect: true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
height: 350,
columns: [
{
checkbox: true
},
{
field: 'saleorderNO',
title: '订单号',
},
{
field: 'pName',
title: '客户名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'wlCode',
title: '料号',
},
{
field: 'itemname',
title: '名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
}
},
{
field: 'qty',
title: '订单数量'
},
{
field: 'orderQty',
title: '已交货数量'
},
{
field: 'qQty',
title: '未交货数量'
}, {
field: 'zzgdOrderqty',
title: '已下工单数量'
},
{
field: 'zzgdQQty',
title: '欠工单数量'
},
{
field: 'SendDate',
title: '交货日期',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
}
},
{
field: 'factory',
title: 'Factory',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
}
},
{
field: 'piNo',
title: 'PNO',
visible: false
}
]
});
</script>
</body>
</html>

440
ruoyi-admin/src/main/resources/templates/produce/workorderhead/workorderhead.html

@ -1,440 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('制工列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>工单号:</label>
<input type="text" name="poId" readonly/>
</li>
<li>
<label>订单号:</label>
<input type="text" name="poNo"/>
</li>
<li>
<label>客户名称:</label>
<input type="text" name="pName"/>
</li>
<li class="select-time">
<label>开单日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginPoDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endPoDate]"/>
</li>
<li class="select-time">
<label>发货日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSendDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSendDate]"/>
</li>
<li>
<label>工单类型:</label>
<select name="workorderClass" th:with="type=${@dict.getType('sys_workorderClass')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>内外销:</label>
<select name="NWX" th:with="type=${@dict.getType('sys_NWX_class')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>加工部门:</label>
<select name="department" th:with="type=${@dict.getType('sys_department_class')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>结案选择:</label>
<select name="endFlag">
<option value="">全部</option>
<option value="1"></option>
<option value="0"></option>
</select>
</li>
<li>
<label>成品代码:</label>
<input type="text" name="cpCode"/>
</li>
<li>
<label>成品名称:</label>
<input type="text" name="cpName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="produce:workorderhead:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="produce:workorderhead:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="produce:workorderhead:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="produce:workorderhead:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('produce:workorderhead:edit')}]];
var removeFlag = [[${@permission.hasPermi('produce:workorderhead:remove')}]];
var prefix = ctx + "produce/workorderhead";
//鼠标移入,显示完整的数据
function paramsMatter (value,row,index){
var span=document.createElement("span");
span.setAttribute("title",value);
span.innerHTML=value;
return span.outerHTML;
}
function add(){
window.location.href=prefix+"/add";
}
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "制工",
height:600,
columns: [
{
checkbox: true
},
{
field: 'poId',
title: '工单号',
visible:false
},
{
field: 'poNo',
title: '订单号'
},
{
field: 'workNo',
title: '工单号'
},
{
field: 'piNo',
title: '',
visible:false
},
{
field: 'pCode',
title: '客户代码',
visible: false
},
{
field: 'pName',
title: '公司名称',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"60px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"80px",
"white-space":"nowrap"
}
}
},
formatter:paramsMatter
},
{
field: 'cpCode',
title: '成品代码'
},
{
field: 'cpQty',
title: '订单数量'
},
{
field: 'ylCpQty',
title: '投单数量'
},
{
field: 'cpInQty',
title: '完工入库数量'
},
{
field: 'qdQty',
title: '欠工单数量'
},
{
field: 'poDate',
title: '开单日期',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"80px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"100px",
"white-space":"nowrap"
}
}
},
},
{
field: 'beginDate',
title: '开工日期',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"80px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"100px",
"white-space":"nowrap"
}
}
},
},
{
field: 'endDate',
title: '完工日期',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"80px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"100px",
"white-space":"nowrap"
}
}
},
},
{
field: 'sendDate',
title: '发货日期',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"80px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"100px",
"white-space":"nowrap"
}
}
},
},
{
field: 'workorderClass',
title: '工单类型',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"60px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"80px",
"white-space":"nowrap"
}
}
},
},
{
field: 'cpName',
title: '成品名称',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"60px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"150px",
"white-space":"nowrap"
}
}
},
formatter:paramsMatter
},
{
field: 'cpType',
title: '规格型号',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"60px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"150px",
"white-space":"nowrap"
}
}
},
formatter:paramsMatter
},
{
field: 'cpMachineno',
title: '机种',
cellStyle: function (value,row,index) {
return{
css:{
"min-width":"60px",
"text-overflow":"ellipsis",
"overflow":"hidden",
"max-width":"150px",
"white-space":"nowrap"
}
}
},
},
{
field: 'cpDw',
title: '单位'
},
{
field: 'bzMemo',
title: '备注'
},
{
field: 'endFlag',
title: '是否结案',
formatter:function (value,index,row) {
if (value==1){
return "是";
}else {
return "否";
}
}
},
{
field: 'chinaInOrOut',
title: '',
visible: false
},
{
field: 'isDelete',
title: '',
visible: false
},
{
field: 'cpwldm',
title: '成品料号',
visible: false
},
{
field: 'nowcpstockqty',
title: '',
visible: false
},
{
field: 'NWX',
title: '',
visible: false
},
{
field: 'haveprint',
title: '',
visible: false
},
{
field: 'bomVersionNo',
title: '版本号',
visible: false
},
{
field: 'badQty',
title: '',
visible: false
},
{
field: 'jaMan',
title: '',
visible: false
},
{
field: 'jaTime',
title: '',
visible: false
},
{
field: 'department',
title: '',
visible: false
},
{
field: 'cpWeizhi',
title: '',
visible: false
},
{
field: 'mjWeizhi',
title: '',
visible: false
},
{
field: 'versionNo',
title: '版本号',
visible: false
},
{
field: 'Factory',
title: '',
visible: false
},
{
field: 'madeQty',
title: '制造数量',
visible: false
},
{
field: 'qMadeQty',
title: '损耗',
visible: false
}
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.poId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.poId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save