解决冲突
commit
7e47ffa2a3
|
@ -11,9 +11,11 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">关联合同:</label>
|
||||
<div class="col-sm-8">
|
||||
<input style="display: none" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" class="form-control" readonly type="text" onclick="openList()" required>
|
||||
|
||||
<div class="input-group">
|
||||
<input style="display: none" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" class="form-control" type="text" onclick="selectOrder()" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -163,12 +165,10 @@
|
|||
title: "关联合同",
|
||||
url: prefix + '/selectOrder',
|
||||
skin: 'layui-layer-gray',
|
||||
btn: ['关闭'],
|
||||
yes:function(index){
|
||||
$.modal.close(index)
|
||||
},
|
||||
btn: false,
|
||||
maxmin: false,
|
||||
full: false,
|
||||
index:1000
|
||||
};
|
||||
$.modal.openOptions(options)
|
||||
}
|
||||
|
|
|
@ -12,9 +12,11 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">关联合同:</label>
|
||||
<div class="col-sm-8">
|
||||
<input style="display: none" th:orderId="*{orderId}" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" th:orderName="*{orderName}" class="form-control" readonly type="text" onclick="openList()" required>
|
||||
|
||||
<div class="input-group">
|
||||
<input style="display: none" th:orderId="*{orderId}" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" th:orderName="*{orderName}" class="form-control" type="text" onclick="selectOrder()" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -166,12 +168,14 @@
|
|||
title: "关联合同",
|
||||
url: prefix + '/selectOrder',
|
||||
skin: 'layui-layer-gray',
|
||||
btn: true,
|
||||
btn: ['关闭'],
|
||||
yes:function(index){
|
||||
$.modal.close(index)
|
||||
},
|
||||
maxmin: false,
|
||||
full: false,
|
||||
index:1000
|
||||
};
|
||||
$.modal.openOptions(options)
|
||||
}
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
</div>
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
|
||||
|
|
|
@ -207,9 +207,17 @@
|
|||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
// var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
//var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].id' value='%s'>", index, value);
|
||||
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
||||
return html+$.table.serialNumber(index);
|
||||
return $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
title: "id",
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.service.IMaintenanceService;
|
||||
import com.ruoyi.sip.service.IOrderDeliveryService;
|
||||
import com.ruoyi.sip.service.IOrderInfoService;
|
||||
import com.ruoyi.sip.service.IProductInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
|
@ -27,10 +34,41 @@ public class MaintenanceController {
|
|||
private String prefix = "manage/service";
|
||||
|
||||
|
||||
@Autowired
|
||||
private IMaintenanceService service;
|
||||
@Autowired
|
||||
private IProductInfoService productInfoService;
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
@Anonymous
|
||||
@GetMapping()
|
||||
public String service()
|
||||
{
|
||||
return prefix + "/service";
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/query")
|
||||
@ResponseBody
|
||||
@Anonymous
|
||||
public AjaxResult query(MaintenanceRecordsDto dto)
|
||||
{
|
||||
return AjaxResult.success(service.query(dto));
|
||||
}
|
||||
@GetMapping("/product")
|
||||
@ResponseBody
|
||||
@Anonymous
|
||||
public AjaxResult product(MaintenanceRecordsDto dto)
|
||||
{
|
||||
return AjaxResult.success(productInfoService.query(dto));
|
||||
}
|
||||
@GetMapping("/order")
|
||||
@ResponseBody
|
||||
@Anonymous
|
||||
public AjaxResult order(MaintenanceRecordsDto dto)
|
||||
{
|
||||
return AjaxResult.success(orderInfoService.selectOrderInfoByMaintenance(dto));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
* @version : 1.0
|
||||
* @ClassName : MaintenanceRecordsDto
|
||||
* @Description :
|
||||
* @DATE : Created in 17:50 2025/4/22
|
||||
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||
* Modification History:
|
||||
* Date Author Version Discription
|
||||
* --------------------------------------------------------------------------
|
||||
* 2025/04/22 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||
*/
|
||||
@Data
|
||||
public class MaintenanceRecord {
|
||||
//开始时间
|
||||
private Date startDate;
|
||||
|
||||
|
||||
}
|
|
@ -2,6 +2,8 @@ package com.ruoyi.sip.domain;
|
|||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
@ -13,6 +15,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* @author mula
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ProductInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -46,99 +50,6 @@ public class ProductInfo extends BaseEntity
|
|||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
private String serialNumber;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setProductCode(String productCode)
|
||||
{
|
||||
this.productCode = productCode;
|
||||
}
|
||||
|
||||
public String getProductCode()
|
||||
{
|
||||
return productCode;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("productCode", getProductCode())
|
||||
.append("productName", getProductName())
|
||||
.append("model", getModel())
|
||||
.append("description", getDescription())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecord;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
|
||||
public interface MaintenanceMapper {
|
||||
MaintenanceRecord query(MaintenanceRecordsDto dto);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecord;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
|
||||
public interface IMaintenanceService {
|
||||
MaintenanceRecord query(MaintenanceRecordsDto dto);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecord;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.mapper.MaintenanceMapper;
|
||||
import com.ruoyi.sip.service.IMaintenanceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
* @version : 1.0
|
||||
* @ClassName : MaintenanceServiceImpl
|
||||
* @Description :
|
||||
* @DATE : Created in 17:36 2025/4/23
|
||||
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||
* Modification History:
|
||||
* Date Author Version Discription
|
||||
* --------------------------------------------------------------------------
|
||||
* 2025/04/23 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MaintenanceServiceImpl implements IMaintenanceService {
|
||||
|
||||
@Resource
|
||||
private MaintenanceMapper mapper;
|
||||
|
||||
|
||||
@Override
|
||||
public MaintenanceRecord query(MaintenanceRecordsDto dto) {
|
||||
return mapper.query(dto);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?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.sip.mapper.MaintenanceMapper">
|
||||
|
||||
<resultMap type="MaintenanceRecord" id="MaintenanceRecordResult">
|
||||
|
||||
<result property="startDate" column="start_date"/>
|
||||
|
||||
</resultMap>
|
||||
<select id="query" resultMap="MaintenanceRecordResult">
|
||||
select delivery_date as start_date from order_delivery
|
||||
where id in (select delivery_id from delivery_list where serial_number=#{serialNumber})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -221,9 +221,9 @@
|
|||
<foreach item="item" index="index" collection="list" separator=";">
|
||||
update order_list
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="item.quantity != null ">quantity = #{item.quantity},</if>
|
||||
<if test="item.quantity != null">quantity = #{item.quantity},</if>
|
||||
<if test="item.amount != null">amount = #{item.amount},</if>
|
||||
<if test="item.remark != null and item.remark!=''">remark = #{item.remark},</if>
|
||||
<if test="item.remark != null">remark = #{item.remark},</if>
|
||||
updated_at = NOW(),
|
||||
</trim>
|
||||
where id = #{item.id}
|
||||
|
|
|
@ -43,13 +43,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</select>
|
||||
<select id="query" resultType="com.ruoyi.sip.domain.ProductInfo">
|
||||
<include refid="selectProductInfoVo"/>
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.product_code,
|
||||
t1.product_name,
|
||||
t1.model,
|
||||
t1.description,
|
||||
t1.remark,
|
||||
t1.created_at,
|
||||
t1.updated_at,
|
||||
t1.deleted_at ,
|
||||
t2.serial_number
|
||||
FROM
|
||||
product_info t1 left join delivery_list t2 on t1.product_code=t2.product_code
|
||||
<where>
|
||||
<if test="serialNumber!=null and serialNumber!=''">
|
||||
and product_code in (select product_code from delivery_list where serial_number=#{serialNumber})
|
||||
and t2.serial_number=#{serialNumber}
|
||||
</if>
|
||||
<if test="productCode!=null and productCode!=''">
|
||||
and product_code=#{productCode}
|
||||
and t1.product_code=#{productCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue