订单init1

highway
zhaoxiaolin 1 year ago
parent 1124174468
commit fa768ee255

@ -22,7 +22,7 @@ import com.op.common.core.utils.poi.ExcelUtil;
/**
* Controller
*
*
* @author Open Platform
* @date 2023-07-13
*/
@ -35,7 +35,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:list")
@RequiresPermissions("mes:pro:order:list")
@GetMapping("/list")
public AjaxResult list(ProOrder proOrder) {
List<ProOrder> list = proOrderService.selectProOrderList(proOrder);
@ -45,7 +45,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:export")
@RequiresPermissions("mes:pro:order:export")
@Log(title = "订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProOrder proOrder) {
@ -57,7 +57,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:query")
@RequiresPermissions("mes:pro:order:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(proOrderService.selectProOrderById(id));
@ -66,7 +66,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:add")
@RequiresPermissions("mes:pro:order:add")
@Log(title = "订单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProOrder proOrder) {
@ -76,7 +76,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:edit")
@RequiresPermissions("mes:pro:order:edit")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProOrder proOrder) {
@ -86,7 +86,7 @@ public class ProOrderController extends BaseController {
/**
*
*/
@RequiresPermissions("order:order:remove")
@RequiresPermissions("mes:pro:order:remove")
@Log(title = "订单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {

@ -9,7 +9,7 @@ import com.op.common.core.web.domain.TreeEntity;
/**
* pro_order
*
*
* @author Open Platform
* @date 2023-07-13
*/
@ -43,6 +43,10 @@ public class ProOrder extends TreeEntity {
@Excel(name = "订单数量")
private Long quantity;
/** 已拆分订单数量 */
@Excel(name = "已拆分订单数量")
private Long quantitySplit;
/** 单位 */
@Excel(name = "单位")
private String unit;
@ -51,6 +55,14 @@ public class ProOrder extends TreeEntity {
@Excel(name = "任务清单")
private String workerOrder;
public Long getQuantitySplit() {
return quantitySplit;
}
public void setQuantitySplit(Long quantitySplit) {
this.quantitySplit = quantitySplit;
}
/** 计划生产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划生产日期", width = 30, dateFormat = "yyyy-MM-dd")

@ -2,6 +2,7 @@ package com.op.mes.service.impl;
import java.util.List;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.ProOrderMapper;
@ -10,7 +11,7 @@ import com.op.mes.service.IProOrderService;
/**
* Service
*
*
* @author Open Platform
* @date 2023-07-13
*/
@ -21,7 +22,7 @@ public class ProOrderServiceImpl implements IProOrderService {
/**
*
*
*
* @param id
* @return
*/
@ -32,7 +33,7 @@ public class ProOrderServiceImpl implements IProOrderService {
/**
*
*
*
* @param proOrder
* @return
*/
@ -43,19 +44,20 @@ public class ProOrderServiceImpl implements IProOrderService {
/**
*
*
*
* @param proOrder
* @return
*/
@Override
public int insertProOrder(ProOrder proOrder) {
proOrder.setId(IdUtils.fastSimpleUUID());
proOrder.setCreateTime(DateUtils.getNowDate());
return proOrderMapper.insertProOrder(proOrder);
}
/**
*
*
*
* @param proOrder
* @return
*/
@ -67,7 +69,7 @@ public class ProOrderServiceImpl implements IProOrderService {
/**
*
*
*
* @param ids
* @return
*/
@ -78,7 +80,7 @@ public class ProOrderServiceImpl implements IProOrderService {
/**
*
*
*
* @param id
* @return
*/

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.mes.mapper.ProOrderMapper">
<resultMap type="ProOrder" id="ProOrderResult">
<result property="id" column="id" />
<result property="factoryCode" column="factory_code" />
@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="prodCode" column="prod_code" />
<result property="prodDesc" column="prod_desc" />
<result property="quantity" column="quantity" />
<result property="quantitySplit" column="quantity_split" />
<result property="unit" column="unit" />
<result property="workerOrder" column="worker_order" />
<result property="planProDate" column="plan_pro_date" />
@ -29,12 +30,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectProOrderVo">
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type from pro_order
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split
unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3,
status, parent_order, create_by, create_time, update_by, update_time, prod_type
from pro_order
</sql>
<select id="selectProOrderList" parameterType="ProOrder" resultMap="ProOrderResult">
<include refid="selectProOrderVo"/>
<where>
<where>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
@ -53,12 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
</where>
</select>
<select id="selectProOrderById" parameterType="String" resultMap="ProOrderResult">
<include refid="selectProOrderVo"/>
where id = #{id}
</select>
<insert id="insertProOrder" parameterType="ProOrder">
insert into pro_order
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -69,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">prod_code,</if>
<if test="prodDesc != null">prod_desc,</if>
<if test="quantity != null">quantity,</if>
<if test="quantitySplit != null">quantity_split,</if>
<if test="unit != null">unit,</if>
<if test="workerOrder != null">worker_order,</if>
<if test="planProDate != null">plan_pro_date,</if>
@ -92,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">#{prodCode},</if>
<if test="prodDesc != null">#{prodDesc},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantitySplit != null">#{quantitySplit},</if>
<if test="unit != null">#{unit},</if>
<if test="workerOrder != null">#{workerOrder},</if>
<if test="planProDate != null">#{planProDate},</if>
@ -118,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodCode != null">prod_code = #{prodCode},</if>
<if test="prodDesc != null">prod_desc = #{prodDesc},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantitySplit != null">quantity_split = #{quantitySplit},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="workerOrder != null">worker_order = #{workerOrder},</if>
<if test="planProDate != null">plan_pro_date = #{planProDate},</if>
@ -141,9 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteProOrderByIds" parameterType="String">
delete from pro_order where id in
delete from pro_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

Loading…
Cancel
Save