删除配件费用,增加加价凭证
This commit is contained in:
parent
582d478186
commit
6dd60354a6
|
|
@ -140,4 +140,18 @@ public class OrderAttachmentRecordController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(orderAttachmentRecordService.deleteOrderAttachmentRecordByIds(ids));
|
return toAjax(orderAttachmentRecordService.deleteOrderAttachmentRecordByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除附件费 根据子单id
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("attach:record:remove")
|
||||||
|
@Log(title = "附件费", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/deleteByDetailId")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult deleteByDetailId(Long id)
|
||||||
|
{
|
||||||
|
return toAjax(orderAttachmentRecordService.deleteOrderAttachmentRecordByOrderDetailId(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1334,7 +1334,7 @@ public class OrderDetailController extends BaseController {
|
||||||
public AjaxResult changePrice(@Valid @RequestBody OrderChangePriceRequest request) {
|
public AjaxResult changePrice(@Valid @RequestBody OrderChangePriceRequest request) {
|
||||||
try {
|
try {
|
||||||
Assert.notNull(request.getChangeMoney(), "报价不能为空");
|
Assert.notNull(request.getChangeMoney(), "报价不能为空");
|
||||||
return toAjax(orderDetailService.changePrice(request.getOrderDetailId(), request.getChangeMoney(), request.getType(), request.getRemark()));
|
return toAjax(orderDetailService.changePrice(request.getOrderDetailId(), request.getChangeMoney(), request.getType(), request.getRemark(),request.getUrls(),request.getFileNames()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,8 @@ public class OrderChangePriceRequest implements Serializable {
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
private String urls;
|
||||||
|
|
||||||
|
private String fileNames;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,13 @@ public interface OrderAttachmentRecordMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteOrderAttachmentRecordByIds(String[] ids);
|
public int deleteOrderAttachmentRecordByIds(String[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除附件费 根据子单id
|
||||||
|
*
|
||||||
|
* @param id 子单id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderAttachmentRecordByOrderDetailId(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,6 @@ public interface IOrderAttachmentRecordService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteOrderAttachmentRecordById(Long id);
|
public int deleteOrderAttachmentRecordById(Long id);
|
||||||
|
|
||||||
|
int deleteOrderAttachmentRecordByOrderDetailId(Long id);
|
||||||
}
|
}
|
||||||
|
|
@ -130,7 +130,7 @@ public interface OrderDetailService {
|
||||||
* @param remark 备注
|
* @param remark 备注
|
||||||
* @return 成功/失败
|
* @return 成功/失败
|
||||||
*/
|
*/
|
||||||
int changePrice(Long orderDetailId, BigDecimal changeMoney, Integer type, String remark) throws Exception;
|
int changePrice(Long orderDetailId, BigDecimal changeMoney, Integer type, String remark,String urls ,String fileNames) throws Exception;
|
||||||
|
|
||||||
int sureChange(Long financialChangeRecordId);
|
int sureChange(Long financialChangeRecordId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,4 +91,16 @@ public class OrderAttachmentRecordServiceImpl implements IOrderAttachmentRecordS
|
||||||
{
|
{
|
||||||
return orderAttachmentRecordMapper.deleteOrderAttachmentRecordById(id);
|
return orderAttachmentRecordMapper.deleteOrderAttachmentRecordById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除附件费信息 根据子单id
|
||||||
|
*
|
||||||
|
* @param id 附件费主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOrderAttachmentRecordByOrderDetailId(Long id)
|
||||||
|
{
|
||||||
|
return orderAttachmentRecordMapper.deleteOrderAttachmentRecordByOrderDetailId(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1026,7 +1026,7 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int changePrice(Long orderDetailId, BigDecimal changeMoney, Integer type, String remark) throws
|
public int changePrice(Long orderDetailId, BigDecimal changeMoney, Integer type, String remark,String urls ,String fileNames) throws
|
||||||
Exception {
|
Exception {
|
||||||
OrderDetail orderDetail = orderDetailMapper.selectById(orderDetailId);
|
OrderDetail orderDetail = orderDetailMapper.selectById(orderDetailId);
|
||||||
if (orderDetail == null) {
|
if (orderDetail == null) {
|
||||||
|
|
@ -1080,6 +1080,8 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
financialChangeRecord.setPayStatus(0);
|
financialChangeRecord.setPayStatus(0);
|
||||||
financialChangeRecord.setType(type);
|
financialChangeRecord.setType(type);
|
||||||
financialChangeRecord.setRemark(remark);
|
financialChangeRecord.setRemark(remark);
|
||||||
|
financialChangeRecord.setUrls(urls);
|
||||||
|
financialChangeRecord.setFileNames(fileNames);
|
||||||
this.buildSettle(financialChangeRecord, deptGoodsCategory, workerMaster);
|
this.buildSettle(financialChangeRecord, deptGoodsCategory, workerMaster);
|
||||||
affectedRows = financialChangeRecordService.insert(financialChangeRecord);
|
affectedRows = financialChangeRecordService.insert(financialChangeRecord);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteOrderAttachmentRecordByOrderDetailId" parameterType="Long">
|
||||||
|
delete from order_attachment_record where order_detail_id = #{id}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -90,4 +90,9 @@ public class FinancialChangeRecord extends BaseEntity {
|
||||||
|
|
||||||
@Excel(name = "工作师傅剩余金额")
|
@Excel(name = "工作师傅剩余金额")
|
||||||
private BigDecimal workerMoney;
|
private BigDecimal workerMoney;
|
||||||
|
|
||||||
|
private String urls;
|
||||||
|
|
||||||
|
private String fileNames;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,13 @@
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="payStatus" column="pay_status"/>
|
<result property="payStatus" column="pay_status"/>
|
||||||
<result property="leftMoney" column="left_money"/>
|
<result property="leftMoney" column="left_money"/>
|
||||||
|
<result property="urls" column="urls"/>
|
||||||
|
<result property="fileNames" column="file_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectFinancialChangeRecordVo">
|
<sql id="selectFinancialChangeRecordVo">
|
||||||
SELECT id, order_detail_id, order_master_id, payment_id, reverse_id,
|
SELECT id, order_detail_id, order_master_id, payment_id, reverse_id,
|
||||||
change_money, status, pay_status, type, left_money, remark FROM financial_change_record
|
change_money, status, pay_status, type, left_money, remark,urls ,file_names FROM financial_change_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNotPayRecordByDetailId" parameterType="Long" resultMap="FinancialChangeRecordResult">
|
<select id="selectNotPayRecordByDetailId" parameterType="Long" resultMap="FinancialChangeRecordResult">
|
||||||
|
|
@ -78,6 +80,8 @@
|
||||||
<if test="payStatus != null">pay_status,</if>
|
<if test="payStatus != null">pay_status,</if>
|
||||||
<if test="type != null">type,</if>
|
<if test="type != null">type,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="urls != null">urls,</if>
|
||||||
|
<if test="fileNames != null">file_names,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="orderDetailId != null">#{orderDetailId},</if>
|
<if test="orderDetailId != null">#{orderDetailId},</if>
|
||||||
|
|
@ -96,6 +100,8 @@
|
||||||
<if test="payStatus != null">#{payStatus},</if>
|
<if test="payStatus != null">#{payStatus},</if>
|
||||||
<if test="type != null">#{type},</if>
|
<if test="type != null">#{type},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="urls != null">#{urls},</if>
|
||||||
|
<if test="fileNames != null">#{fileNames},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue