| | |
| | | alter table sales_ledger |
| | | add payment_method varchar(255) null; |
| | | |
| | | |
| | | alter table payment_registration |
| | | modify sale_ledger_id bigint default 0 null comment '销售台账id'; |
| | | |
| | | |
| | |
| | | @Autowired |
| | | private IDeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @ApiModelProperty("设备报修列表") |
| | | @ApiModelProperty("设备保养列表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceMaintenanceDto deviceMaintenanceDto) { |
| | | return AjaxResult.success(deviceMaintenanceService.queryPage(page,deviceMaintenanceDto)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("添加设备报修") |
| | | @ApiModelProperty("添加设备保养") |
| | | public AjaxResult add(@RequestBody DeviceMaintenance deviceRepair) { |
| | | return deviceMaintenanceService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @ApiModelProperty("根据id查询设备报修") |
| | | @ApiModelProperty("根据id查询设备保养") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceMaintenanceService.getById(id)); |
| | | return AjaxResult.success(deviceMaintenanceService.detailById(id)); |
| | | } |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("修改设备报修") |
| | | @ApiModelProperty("修改设备保养") |
| | | public AjaxResult update(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | @PostMapping ("maintenance") |
| | | @ApiModelProperty("修改设备保养") |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiModelProperty("删除设备报修") |
| | | @ApiModelProperty("删除设备保养") |
| | | public AjaxResult delete(@PathVariable ArrayList<Long> ids) { |
| | | boolean b = deviceMaintenanceService.removeBatchByIds(ids); |
| | | if (!b) { |
| | |
| | | } |
| | | |
| | | @PostMapping("export") |
| | | @ApiModelProperty("导出设备报修") |
| | | @ApiModelProperty("导出设备保养") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceMaintenanceService.export(response, ids); |
| | | } |
| | |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "设备报修管理") |
| | | @RequestMapping("/device/reppair") |
| | | @RequestMapping("/device/repair") |
| | | @RestController |
| | | public class DeviceRepairController { |
| | | |
| | |
| | | @ApiModelProperty("根据id查询设备报修") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceRepairService.getById(id)); |
| | | DeviceRepairDto byId = deviceRepairService.detailById(id); |
| | | return AjaxResult.success(byId); |
| | | } |
| | | |
| | | @PutMapping () |
| | |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @PostMapping ("repair") |
| | | @ApiModelProperty("设备维修") |
| | | public AjaxResult repair( @RequestBody DeviceRepair deviceRepair) { |
| | | deviceRepair.setStatus(1); |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("删除设备报修") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("设备台账id") |
| | | private String deviceLedgerId; |
| | | private Long deviceLedgerId; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | private String deviceName; |
| | |
| | | public interface DeviceMaintenanceMapper extends BaseMapper<DeviceMaintenance> { |
| | | |
| | | IPage<DeviceMaintenanceDto> queryPage(Page page, DeviceMaintenanceDto deviceMaintenanceDto); |
| | | |
| | | DeviceMaintenanceDto detailById(Long id); |
| | | } |
| | |
| | | @Mapper |
| | | public interface DeviceRepairMapper extends BaseMapper<DeviceRepair> { |
| | | IPage<DeviceRepairDto> queryPage(Page page, @Param("deviceRepairDto") DeviceRepairDto deviceRepairDto); |
| | | |
| | | DeviceRepairDto detailById(Long id); |
| | | } |
| | |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | |
| | | DeviceMaintenanceDto detailById(Long id); |
| | | } |
| | |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | |
| | | DeviceRepairDto detailById(Long id); |
| | | } |
| | |
| | | ExcelUtil<DeviceMaintenanceExeclDto> util = new ExcelUtil<DeviceMaintenanceExeclDto>(DeviceMaintenanceExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "设备报修导出"); |
| | | } |
| | | |
| | | @Override |
| | | public DeviceMaintenanceDto detailById(Long id) { |
| | | |
| | | return deviceMaintenanceMapper.detailById(id); |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public DeviceRepairDto detailById(Long id) { |
| | | |
| | | return deviceRepairMapper.detailById(id); |
| | | } |
| | | |
| | | } |
| | |
| | | //供应商名称 |
| | | private String supplierName; |
| | | //增值税 |
| | | private String invoiceAmount; |
| | | private String invoiceAmount = "0"; |
| | | |
| | | private String invoiceNumber; |
| | | private String invoiceNumber = "0"; |
| | | |
| | | private String unTicketsPrice; |
| | | private String unTicketsPrice = "0"; |
| | | |
| | | private List<CommonFile> commonFiles; |
| | | } |
| | |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(paymentRegistration.getPurchaseLedgerId()); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectOne(new QueryWrapper<SalesLedger>(). |
| | | eq("sales_contract_no", purchaseLedger.getSalesContractNo())); |
| | | if (salesLedger == null) { |
| | | throw new RuntimeException("关联销售合同号不存在"); |
| | | // if (salesLedger == null) { |
| | | // throw new RuntimeException("关联销售合同号不存在"); |
| | | // } |
| | | if (salesLedger != null) { |
| | | paymentRegistration.setSaleLedgerId(salesLedger.getId()); |
| | | } |
| | | |
| | | paymentRegistration.setSaleLedgerId(salesLedger.getId()); |
| | | paymentRegistration.setSupplierId(purchaseLedger.getSupplierId()); |
| | | |
| | | TicketRegistration tr = ticketRegistrationMapper.selectOne(new LambdaQueryWrapper<TicketRegistration>().eq(TicketRegistration::getId, paymentRegistration.getTicketRegistrationId())); |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.dto.DeviceMaintenanceDto"> |
| | | select dm.*, |
| | | dl.device_name, |
| | | dl.device_model |
| | | from device_maintenance dm |
| | | left join device_ledger dl on dm.device_ledger_id = dl.id |
| | | where dm.id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.dto.DeviceRepairDto"> |
| | | select dr.*, |
| | | dl.device_name, |
| | | dl.device_model |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.device_ledger_id = dl.id |
| | | where dr.id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |