liuxiaoxu
6 months ago
7 changed files with 940 additions and 0 deletions
@ -0,0 +1,151 @@ |
|||||
|
package com.ruoyi.quality.controller; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.ui.ModelMap; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
import com.ruoyi.common.annotation.Log; |
||||
|
import com.ruoyi.common.enums.BusinessType; |
||||
|
import com.ruoyi.quality.domain.QualityOrder; |
||||
|
import com.ruoyi.quality.service.IQualityOrderService; |
||||
|
import com.ruoyi.common.core.controller.BaseController; |
||||
|
import com.ruoyi.common.core.domain.AjaxResult; |
||||
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单Controller |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/quality/qualityOrder") |
||||
|
public class QualityOrderController extends BaseController |
||||
|
{ |
||||
|
private String prefix = "quality/qualityOrder"; |
||||
|
|
||||
|
@Autowired |
||||
|
private IQualityOrderService qualityOrderService; |
||||
|
|
||||
|
@RequiresPermissions("quality:qualityOrder:view") |
||||
|
@GetMapping() |
||||
|
public String qualityOrder() |
||||
|
{ |
||||
|
return prefix + "/qualityOrder"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:list") |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<QualityOrder> list = qualityOrderService.selectQualityOrderList(qualityOrder); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出品质管理品质单列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:export") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ResponseBody |
||||
|
public AjaxResult export(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
List<QualityOrder> list = qualityOrderService.selectQualityOrderList(qualityOrder); |
||||
|
ExcelUtil<QualityOrder> util = new ExcelUtil<QualityOrder>(QualityOrder.class); |
||||
|
return util.exportExcel(list, "品质管理品质单数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单 |
||||
|
*/ |
||||
|
@GetMapping("/add") |
||||
|
public String add() |
||||
|
{ |
||||
|
return prefix + "/add"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增保存品质管理品质单 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:add") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.INSERT) |
||||
|
@PostMapping("/add") |
||||
|
@ResponseBody |
||||
|
public AjaxResult addSave(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
return toAjax(qualityOrderService.insertQualityOrder(qualityOrder)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单 |
||||
|
*/ |
||||
|
@GetMapping("/edit/{qualityOrderId}") |
||||
|
public String edit(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) |
||||
|
{ |
||||
|
QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); |
||||
|
mmap.put("qualityOrder", qualityOrder); |
||||
|
return prefix + "/edit"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改保存品质管理品质单 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:edit") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.UPDATE) |
||||
|
@PostMapping("/edit") |
||||
|
@ResponseBody |
||||
|
public AjaxResult editSave(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
return toAjax(qualityOrderService.updateQualityOrder(qualityOrder)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:remove") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.DELETE) |
||||
|
@PostMapping( "/remove") |
||||
|
@ResponseBody |
||||
|
public AjaxResult remove(String ids) |
||||
|
{ |
||||
|
return toAjax(qualityOrderService.deleteQualityOrderByIds(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:cancel") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.CANCEL) |
||||
|
@GetMapping( "/cancel/{id}") |
||||
|
@ResponseBody |
||||
|
public AjaxResult cancel(@PathVariable("id") Long id){ |
||||
|
return toAjax(qualityOrderService.cancelQualityOrderById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualityOrder:restore") |
||||
|
@Log(title = "品质管理品质单", businessType = BusinessType.RESTORE) |
||||
|
@GetMapping( "/restore/{id}") |
||||
|
@ResponseBody |
||||
|
public AjaxResult restore(@PathVariable("id")Long id) |
||||
|
{ |
||||
|
return toAjax(qualityOrderService.restoreQualityOrderById(id)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,199 @@ |
|||||
|
package com.ruoyi.quality.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.ruoyi.common.annotation.Excel; |
||||
|
import com.ruoyi.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单对象 quality_order |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public class QualityOrder extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 品质单Id */ |
||||
|
private Long qualityOrderId; |
||||
|
|
||||
|
/** 品质单号 */ |
||||
|
@Excel(name = "品质单号") |
||||
|
private String qualityOrderCode; |
||||
|
|
||||
|
/** 入库单号 */ |
||||
|
@Excel(name = "入库单号") |
||||
|
private String inStorageCode; |
||||
|
|
||||
|
/** 关联订单号 */ |
||||
|
@Excel(name = "关联订单号") |
||||
|
private String relatedOrderCode; |
||||
|
|
||||
|
/** 品质状态 */ |
||||
|
@Excel(name = "品质状态") |
||||
|
private String qualityStatus; |
||||
|
|
||||
|
/** 品质单订单类型 */ |
||||
|
@Excel(name = "品质单订单类型") |
||||
|
private String qualityOrderType; |
||||
|
|
||||
|
/** 品质单入库类型 */ |
||||
|
@Excel(name = "品质单入库类型") |
||||
|
private String qualityStorageStatus; |
||||
|
|
||||
|
/** 本次到货数量 */ |
||||
|
@Excel(name = "本次到货数量") |
||||
|
private Integer thisArrivedNum; |
||||
|
|
||||
|
/** 品质合格数 */ |
||||
|
@Excel(name = "品质合格数") |
||||
|
private Integer qualityQualifiedNum; |
||||
|
|
||||
|
/** 品质不合格数 */ |
||||
|
@Excel(name = "品质不合格数") |
||||
|
private Integer qualityUnqualifiedNum; |
||||
|
|
||||
|
/** 交付质检时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "交付质检时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date deliveryInspectionTime; |
||||
|
|
||||
|
/** 品质员工 */ |
||||
|
@Excel(name = "品质员工") |
||||
|
private String qualityEmployee; |
||||
|
|
||||
|
public void setQualityOrderId(Long qualityOrderId) |
||||
|
{ |
||||
|
this.qualityOrderId = qualityOrderId; |
||||
|
} |
||||
|
|
||||
|
public Long getQualityOrderId() |
||||
|
{ |
||||
|
return qualityOrderId; |
||||
|
} |
||||
|
public void setQualityOrderCode(String qualityOrderCode) |
||||
|
{ |
||||
|
this.qualityOrderCode = qualityOrderCode; |
||||
|
} |
||||
|
|
||||
|
public String getQualityOrderCode() |
||||
|
{ |
||||
|
return qualityOrderCode; |
||||
|
} |
||||
|
public void setInStorageCode(String inStorageCode) |
||||
|
{ |
||||
|
this.inStorageCode = inStorageCode; |
||||
|
} |
||||
|
|
||||
|
public String getInStorageCode() |
||||
|
{ |
||||
|
return inStorageCode; |
||||
|
} |
||||
|
public void setRelatedOrderCode(String relatedOrderCode) |
||||
|
{ |
||||
|
this.relatedOrderCode = relatedOrderCode; |
||||
|
} |
||||
|
|
||||
|
public String getRelatedOrderCode() |
||||
|
{ |
||||
|
return relatedOrderCode; |
||||
|
} |
||||
|
public void setQualityStatus(String qualityStatus) |
||||
|
{ |
||||
|
this.qualityStatus = qualityStatus; |
||||
|
} |
||||
|
|
||||
|
public String getQualityStatus() |
||||
|
{ |
||||
|
return qualityStatus; |
||||
|
} |
||||
|
public void setQualityOrderType(String qualityOrderType) |
||||
|
{ |
||||
|
this.qualityOrderType = qualityOrderType; |
||||
|
} |
||||
|
|
||||
|
public String getQualityOrderType() |
||||
|
{ |
||||
|
return qualityOrderType; |
||||
|
} |
||||
|
public void setQualityStorageStatus(String qualityStorageStatus) |
||||
|
{ |
||||
|
this.qualityStorageStatus = qualityStorageStatus; |
||||
|
} |
||||
|
|
||||
|
public String getQualityStorageStatus() |
||||
|
{ |
||||
|
return qualityStorageStatus; |
||||
|
} |
||||
|
public void setThisArrivedNum(Integer thisArrivedNum) |
||||
|
{ |
||||
|
this.thisArrivedNum = thisArrivedNum; |
||||
|
} |
||||
|
|
||||
|
public Integer getThisArrivedNum() |
||||
|
{ |
||||
|
return thisArrivedNum; |
||||
|
} |
||||
|
public void setQualityQualifiedNum(Integer qualityQualifiedNum) |
||||
|
{ |
||||
|
this.qualityQualifiedNum = qualityQualifiedNum; |
||||
|
} |
||||
|
|
||||
|
public Integer getQualityQualifiedNum() |
||||
|
{ |
||||
|
return qualityQualifiedNum; |
||||
|
} |
||||
|
public void setQualityUnqualifiedNum(Integer qualityUnqualifiedNum) |
||||
|
{ |
||||
|
this.qualityUnqualifiedNum = qualityUnqualifiedNum; |
||||
|
} |
||||
|
|
||||
|
public Integer getQualityUnqualifiedNum() |
||||
|
{ |
||||
|
return qualityUnqualifiedNum; |
||||
|
} |
||||
|
public void setDeliveryInspectionTime(Date deliveryInspectionTime) |
||||
|
{ |
||||
|
this.deliveryInspectionTime = deliveryInspectionTime; |
||||
|
} |
||||
|
|
||||
|
public Date getDeliveryInspectionTime() |
||||
|
{ |
||||
|
return deliveryInspectionTime; |
||||
|
} |
||||
|
public void setQualityEmployee(String qualityEmployee) |
||||
|
{ |
||||
|
this.qualityEmployee = qualityEmployee; |
||||
|
} |
||||
|
|
||||
|
public String getQualityEmployee() |
||||
|
{ |
||||
|
return qualityEmployee; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("qualityOrderId", getQualityOrderId()) |
||||
|
.append("qualityOrderCode", getQualityOrderCode()) |
||||
|
.append("inStorageCode", getInStorageCode()) |
||||
|
.append("relatedOrderCode", getRelatedOrderCode()) |
||||
|
.append("qualityStatus", getQualityStatus()) |
||||
|
.append("qualityOrderType", getQualityOrderType()) |
||||
|
.append("qualityStorageStatus", getQualityStorageStatus()) |
||||
|
.append("thisArrivedNum", getThisArrivedNum()) |
||||
|
.append("qualityQualifiedNum", getQualityQualifiedNum()) |
||||
|
.append("qualityUnqualifiedNum", getQualityUnqualifiedNum()) |
||||
|
.append("deliveryInspectionTime", getDeliveryInspectionTime()) |
||||
|
.append("qualityEmployee", getQualityEmployee()) |
||||
|
.append("remark", getRemark()) |
||||
|
.append("createBy", getCreateBy()) |
||||
|
.append("createTime", getCreateTime()) |
||||
|
.append("updateBy", getUpdateBy()) |
||||
|
.append("updateTime", getUpdateTime()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
package com.ruoyi.quality.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.quality.domain.QualityOrder; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单Mapper接口 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public interface QualityOrderMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 品质管理品质单 |
||||
|
*/ |
||||
|
public QualityOrder selectQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单列表 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 品质管理品质单集合 |
||||
|
*/ |
||||
|
public List<QualityOrder> selectQualityOrderList(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualityOrder(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualityOrder(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderIds 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderByIds(String[] qualityOrderIds); |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int cancelQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int restoreQualityOrderById(Long qualityOrderId); |
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package com.ruoyi.quality.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.quality.domain.QualityOrder; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单Service接口 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public interface IQualityOrderService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 品质管理品质单 |
||||
|
*/ |
||||
|
public QualityOrder selectQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单列表 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 品质管理品质单集合 |
||||
|
*/ |
||||
|
public List<QualityOrder> selectQualityOrderList(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualityOrder(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualityOrder(QualityOrder qualityOrder); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除品质管理品质单 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderByIds(String ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单信息 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单 |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return |
||||
|
*/ |
||||
|
int cancelQualityOrderById(Long qualityOrderId); |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单 |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return |
||||
|
*/ |
||||
|
int restoreQualityOrderById(Long qualityOrderId); |
||||
|
} |
@ -0,0 +1,126 @@ |
|||||
|
package com.ruoyi.quality.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.common.utils.DateUtils; |
||||
|
import com.ruoyi.common.utils.ShiroUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.ruoyi.quality.mapper.QualityOrderMapper; |
||||
|
import com.ruoyi.quality.domain.QualityOrder; |
||||
|
import com.ruoyi.quality.service.IQualityOrderService; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单Service业务层处理 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class QualityOrderServiceImpl implements IQualityOrderService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private QualityOrderMapper qualityOrderMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 品质管理品质单 |
||||
|
*/ |
||||
|
@Override |
||||
|
public QualityOrder selectQualityOrderById(Long qualityOrderId) |
||||
|
{ |
||||
|
return qualityOrderMapper.selectQualityOrderById(qualityOrderId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单列表 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 品质管理品质单 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<QualityOrder> selectQualityOrderList(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
return qualityOrderMapper.selectQualityOrderList(qualityOrder); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertQualityOrder(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
qualityOrder.setCreateBy(loginName); |
||||
|
qualityOrder.setCreateTime(DateUtils.getNowDate()); |
||||
|
return qualityOrderMapper.insertQualityOrder(qualityOrder); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrder 品质管理品质单 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateQualityOrder(QualityOrder qualityOrder) |
||||
|
{ |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
qualityOrder.setUpdateBy(loginName); |
||||
|
qualityOrder.setUpdateTime(DateUtils.getNowDate()); |
||||
|
return qualityOrderMapper.updateQualityOrder(qualityOrder); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单对象 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualityOrderByIds(String ids) |
||||
|
{ |
||||
|
return qualityOrderMapper.deleteQualityOrderByIds(Convert.toStrArray(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单信息 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualityOrderById(Long qualityOrderId) |
||||
|
{ |
||||
|
return qualityOrderMapper.deleteQualityOrderById(qualityOrderId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int cancelQualityOrderById(Long qualityOrderId) |
||||
|
{ |
||||
|
return qualityOrderMapper.cancelQualityOrderById(qualityOrderId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单信息 |
||||
|
* |
||||
|
* @param qualityOrderId 品质管理品质单ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int restoreQualityOrderById(Long qualityOrderId) |
||||
|
{ |
||||
|
return qualityOrderMapper.restoreQualityOrderById(qualityOrderId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,132 @@ |
|||||
|
<?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.quality.mapper.QualityOrderMapper"> |
||||
|
|
||||
|
<resultMap type="QualityOrder" id="QualityOrderResult"> |
||||
|
<result property="qualityOrderId" column="quality_order_id" /> |
||||
|
<result property="qualityOrderCode" column="quality_order_code" /> |
||||
|
<result property="inStorageCode" column="in_storage_code" /> |
||||
|
<result property="relatedOrderCode" column="related_order_code" /> |
||||
|
<result property="qualityStatus" column="quality_status" /> |
||||
|
<result property="qualityOrderType" column="quality_order_type" /> |
||||
|
<result property="qualityStorageStatus" column="quality_storage_status" /> |
||||
|
<result property="thisArrivedNum" column="this_arrived_num" /> |
||||
|
<result property="qualityQualifiedNum" column="quality_qualified_num" /> |
||||
|
<result property="qualityUnqualifiedNum" column="quality_unqualified_num" /> |
||||
|
<result property="deliveryInspectionTime" column="delivery_inspection_time" /> |
||||
|
<result property="qualityEmployee" column="quality_employee" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
<result property="createBy" column="create_by" /> |
||||
|
<result property="createTime" column="create_time" /> |
||||
|
<result property="updateBy" column="update_by" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectQualityOrderVo"> |
||||
|
select quality_order_id, quality_order_code, in_storage_code, related_order_code, quality_status, quality_order_type, quality_storage_status, this_arrived_num, quality_qualified_num, quality_unqualified_num, delivery_inspection_time, quality_employee, remark, create_by, create_time, update_by, update_time from quality_order |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectQualityOrderList" parameterType="QualityOrder" resultMap="QualityOrderResult"> |
||||
|
<include refid="selectQualityOrderVo"/> |
||||
|
<where> |
||||
|
<if test="qualityOrderCode != null and qualityOrderCode != ''"> and quality_order_code = #{qualityOrderCode}</if> |
||||
|
<if test="inStorageCode != null and inStorageCode != ''"> and in_storage_code = #{inStorageCode}</if> |
||||
|
<if test="relatedOrderCode != null and relatedOrderCode != ''"> and related_order_code = #{relatedOrderCode}</if> |
||||
|
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if> |
||||
|
<if test="qualityOrderType != null and qualityOrderType != ''"> and quality_order_type = #{qualityOrderType}</if> |
||||
|
<if test="qualityStorageStatus != null and qualityStorageStatus != ''"> and quality_storage_status = #{qualityStorageStatus}</if> |
||||
|
<if test="qualityEmployee != null and qualityEmployee != ''"> and quality_employee = #{qualityEmployee}</if> |
||||
|
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectQualityOrderById" parameterType="Long" resultMap="QualityOrderResult"> |
||||
|
<include refid="selectQualityOrderVo"/> |
||||
|
where quality_order_id = #{qualityOrderId} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertQualityOrder" parameterType="QualityOrder" useGeneratedKeys="true" keyProperty="qualityOrderId"> |
||||
|
insert into quality_order |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">quality_order_code,</if> |
||||
|
<if test="inStorageCode != null">in_storage_code,</if> |
||||
|
<if test="relatedOrderCode != null">related_order_code,</if> |
||||
|
<if test="qualityStatus != null">quality_status,</if> |
||||
|
<if test="qualityOrderType != null">quality_order_type,</if> |
||||
|
<if test="qualityStorageStatus != null">quality_storage_status,</if> |
||||
|
<if test="thisArrivedNum != null">this_arrived_num,</if> |
||||
|
<if test="qualityQualifiedNum != null">quality_qualified_num,</if> |
||||
|
<if test="qualityUnqualifiedNum != null">quality_unqualified_num,</if> |
||||
|
<if test="deliveryInspectionTime != null">delivery_inspection_time,</if> |
||||
|
<if test="qualityEmployee != null">quality_employee,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
<if test="createBy != null">create_by,</if> |
||||
|
<if test="createTime != null">create_time,</if> |
||||
|
<if test="updateBy != null">update_by,</if> |
||||
|
<if test="updateTime != null">update_time,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">#{qualityOrderCode},</if> |
||||
|
<if test="inStorageCode != null">#{inStorageCode},</if> |
||||
|
<if test="relatedOrderCode != null">#{relatedOrderCode},</if> |
||||
|
<if test="qualityStatus != null">#{qualityStatus},</if> |
||||
|
<if test="qualityOrderType != null">#{qualityOrderType},</if> |
||||
|
<if test="qualityStorageStatus != null">#{qualityStorageStatus},</if> |
||||
|
<if test="thisArrivedNum != null">#{thisArrivedNum},</if> |
||||
|
<if test="qualityQualifiedNum != null">#{qualityQualifiedNum},</if> |
||||
|
<if test="qualityUnqualifiedNum != null">#{qualityUnqualifiedNum},</if> |
||||
|
<if test="deliveryInspectionTime != null">#{deliveryInspectionTime},</if> |
||||
|
<if test="qualityEmployee != null">#{qualityEmployee},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
<if test="createBy != null">#{createBy},</if> |
||||
|
<if test="createTime != null">#{createTime},</if> |
||||
|
<if test="updateBy != null">#{updateBy},</if> |
||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateQualityOrder" parameterType="QualityOrder"> |
||||
|
update quality_order |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">quality_order_code = #{qualityOrderCode},</if> |
||||
|
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if> |
||||
|
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if> |
||||
|
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if> |
||||
|
<if test="qualityOrderType != null">quality_order_type = #{qualityOrderType},</if> |
||||
|
<if test="qualityStorageStatus != null">quality_storage_status = #{qualityStorageStatus},</if> |
||||
|
<if test="thisArrivedNum != null">this_arrived_num = #{thisArrivedNum},</if> |
||||
|
<if test="qualityQualifiedNum != null">quality_qualified_num = #{qualityQualifiedNum},</if> |
||||
|
<if test="qualityUnqualifiedNum != null">quality_unqualified_num = #{qualityUnqualifiedNum},</if> |
||||
|
<if test="deliveryInspectionTime != null">delivery_inspection_time = #{deliveryInspectionTime},</if> |
||||
|
<if test="qualityEmployee != null">quality_employee = #{qualityEmployee},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
<if test="createBy != null">create_by = #{createBy},</if> |
||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
|
</trim> |
||||
|
where quality_order_id = #{qualityOrderId} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteQualityOrderById" parameterType="Long"> |
||||
|
delete from quality_order where quality_order_id = #{qualityOrderId} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteQualityOrderByIds" parameterType="String"> |
||||
|
delete from quality_order where quality_order_id in |
||||
|
<foreach item="qualityOrderId" collection="array" open="(" separator="," close=")"> |
||||
|
#{qualityOrderId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<update id="cancelQualityOrderById" parameterType="Long"> |
||||
|
update quality_order set del_flag = '1' where quality_order_id = #{qualityOrderId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="restoreQualityOrderById" parameterType="Long"> |
||||
|
update quality_order set del_flag = '0' where quality_order_id = #{qualityOrderId} |
||||
|
</update> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,180 @@ |
|||||
|
<!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="qualityOrderCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>入库单号:</label> |
||||
|
<input type="text" name="inStorageCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>品质状态:</label> |
||||
|
<select name="qualityStatus" th:with="type=${@dict.getType('qualityStatus')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>关联订单号:</label> |
||||
|
<input type="text" name="relatedOrderCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>品质员:</label> |
||||
|
<input type="text" name="qualityEmployee"/> |
||||
|
</li> |
||||
|
<li class="select-time"> |
||||
|
<label>录入时间:</label> |
||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
||||
|
<span>-</span> |
||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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="quality:qualityOrder:add"> |
||||
|
<i class="fa fa-plus"></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('quality:qualityOrder:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('quality:qualityOrder:remove')}]]; |
||||
|
var cancelFlag = [[${@permission.hasPermi('quality:qualityOrder:cancel')}]]; |
||||
|
var restoreFlag = [[${@permission.hasPermi('quality:qualityOrder:restore')}]]; |
||||
|
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; |
||||
|
var qualityOrderTypeDatas = [[${@dict.getType('quality_order_type')}]]; |
||||
|
var qualityStorageStatusDatas = [[${@dict.getType('quality_storage_status')}]]; |
||||
|
var prefix = ctx + "quality/qualityOrder"; |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
cancelUrl: prefix + "/cancel/{id}", |
||||
|
restoreUrl: prefix + "/restore/{id}", |
||||
|
exportUrl: prefix + "/export", |
||||
|
modalName: "品质管理品质单", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质单Id', |
||||
|
field: 'qualityOrderId', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质单号', |
||||
|
field: 'qualityOrderCode', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质状态', |
||||
|
field: 'qualityStatus', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(qualityStatusDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '入库单号', |
||||
|
field: 'inStorageCode', |
||||
|
}, |
||||
|
{ |
||||
|
title: '关联订单号', |
||||
|
field: 'relatedOrderCode', |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
title: '订单类型', |
||||
|
field: 'qualityOrderType', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(qualityOrderTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '入库类型', |
||||
|
field: 'qualityStorageStatus', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(qualityStorageStatusDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '本次到货数量', |
||||
|
field: 'thisArrivedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质合格数', |
||||
|
field: 'qualityQualifiedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质不合格数', |
||||
|
field: 'qualityUnqualifiedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '交检时间', |
||||
|
field: 'deliveryInspectionTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质员', |
||||
|
field: 'qualityEmployee', |
||||
|
}, |
||||
|
{ |
||||
|
title: '录入人', |
||||
|
field: 'createBy', |
||||
|
}, |
||||
|
{ |
||||
|
title: '录入时间', |
||||
|
field: 'createTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新人', |
||||
|
field: 'updateBy', |
||||
|
}, |
||||
|
{ |
||||
|
title: '上次更新时间', |
||||
|
field: 'updateTime', |
||||
|
}, |
||||
|
{ |
||||
|
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.qualityOrderId + '\')"><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.qualityOrderId + '\')"><i class="fa fa-remove"></i>删除</a> '); |
||||
|
if(row.delFlag == '0'){ |
||||
|
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
||||
|
}else{ |
||||
|
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
||||
|
} |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue