Compare commits
	
		
			10 Commits
		
	
	
		
			51735e32f9
			...
			093d05b5ce
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 093d05b5ce | |
|  | 92f493f686 | |
|  | 810e85e081 | |
|  | ac6b321f6d | |
|  | bdfad6b0f3 | |
|  | a5244f1a99 | |
|  | a1c385fcf1 | |
|  | 9be598529b | |
|  | 11ec6d4839 | |
|  | e79ef356dc | 
|  | @ -233,10 +233,13 @@ public class BizTodoItemService { | ||||||
|                         if (applyMap != null) { |                         if (applyMap != null) { | ||||||
|                             map.put("areaId", applyMap.get("marketingAreaId")); |                             map.put("areaId", applyMap.get("marketingAreaId")); | ||||||
|                             todoUserIdsList = userService.listAll(map, ".selectTodoUserListByTaskId"); |                             todoUserIdsList = userService.listAll(map, ".selectTodoUserListByTaskId"); | ||||||
|  |                             if (CollectionUtils.isEmpty(todoUserIdsList)) { | ||||||
|  |                                 todoUserIdsList = userService.listAll(map, ".selectTodoUserListByTaskId1"); | ||||||
|  |                             } | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     // 如果营销区域的上级是华南业务部,且审批流到了业务部长,该区域的部长离职后未找到合适人选,审核直接提交给营销总监 |                     // 如果营销区域的上级是华南业务部,且审批流到了业务部长,该区域的部长离职后未找到合适人选,审核直接提交给营销总监 | ||||||
|                     if (("da_company").equals(codeMap.get("staffNo") + "")) { |                     /*if (("da_company").equals(codeMap.get("staffNo") + "")) { | ||||||
|                         Map<String, Object> tempMap = new HashMap<>(); |                         Map<String, Object> tempMap = new HashMap<>(); | ||||||
|                         tempMap.put("areaId", areaId); |                         tempMap.put("areaId", areaId); | ||||||
|                         Map areaMap = marketingAreaService.oneBySql(tempMap, ".oneBySql"); |                         Map areaMap = marketingAreaService.oneBySql(tempMap, ".oneBySql"); | ||||||
|  | @ -248,7 +251,7 @@ public class BizTodoItemService { | ||||||
|                             userInfo.setUserId("ad5f919896fb4a5daefb3a3afa5f59e3"); |                             userInfo.setUserId("ad5f919896fb4a5daefb3a3afa5f59e3"); | ||||||
|                             todoUserIdsList.add(userInfo); |                             todoUserIdsList.add(userInfo); | ||||||
|                         } |                         } | ||||||
|                     } |                     }*/ | ||||||
|                     if (!CollectionUtils.isEmpty(todoUserIdsList)) { |                     if (!CollectionUtils.isEmpty(todoUserIdsList)) { | ||||||
|                         for (int i = 0; i < todoUserIdsList.size(); i++) { |                         for (int i = 0; i < todoUserIdsList.size(); i++) { | ||||||
|                             UserInfo userInfo = (UserInfo) todoUserIdsList.get(i); |                             UserInfo userInfo = (UserInfo) todoUserIdsList.get(i); | ||||||
|  |  | ||||||
|  | @ -71,6 +71,9 @@ public class ReceiptRecordsController extends BaseController { | ||||||
|             @ApiParam(required = false, value = "经销商出货开始时间") @RequestParam(required = false) String startDate, |             @ApiParam(required = false, value = "经销商出货开始时间") @RequestParam(required = false) String startDate, | ||||||
|             @ApiParam(required = false, value = "经销商出货结束时间") @RequestParam(required = false) String endDate, |             @ApiParam(required = false, value = "经销商出货结束时间") @RequestParam(required = false) String endDate, | ||||||
|             @ApiParam(required = false, value = "发货单客户id") @RequestParam(required = false) String invoiceClientId, |             @ApiParam(required = false, value = "发货单客户id") @RequestParam(required = false) String invoiceClientId, | ||||||
|  |             @ApiParam(required = false, value = "商品编码") @RequestParam(required = false) String goodsNo, | ||||||
|  |             @ApiParam(required = false, value = "商品名称") @RequestParam(required = false) String goodsName, | ||||||
|  |             @ApiParam(required = false, value = "商品规格") @RequestParam(required = false) String specifications, | ||||||
|             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, |             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, | ||||||
|             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, |             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, | ||||||
|             HttpServletRequest request) { |             HttpServletRequest request) { | ||||||
|  | @ -96,6 +99,9 @@ public class ReceiptRecordsController extends BaseController { | ||||||
|         params.put("startDate", startDate); |         params.put("startDate", startDate); | ||||||
|         params.put("endDate", endDate); |         params.put("endDate", endDate); | ||||||
|         params.put("invoiceClientId", invoiceClientId); |         params.put("invoiceClientId", invoiceClientId); | ||||||
|  |         params.put("goodsNo", goodsNo); | ||||||
|  |         params.put("goodsName", goodsName); | ||||||
|  |         params.put("specifications", specifications); | ||||||
|         params.put("page", pageNum); |         params.put("page", pageNum); | ||||||
|         params.put("pageSize", pageSize); |         params.put("pageSize", pageSize); | ||||||
|         return toPage(receiptRecordsService.pageList(params, ".findRecordsByCondition")); |         return toPage(receiptRecordsService.pageList(params, ".findRecordsByCondition")); | ||||||
|  |  | ||||||
|  | @ -51,6 +51,7 @@ public class StockReportApi extends BaseController { | ||||||
|             @ApiParam(required = false, value = "规格") @RequestParam(required = false) String specifications, |             @ApiParam(required = false, value = "规格") @RequestParam(required = false) String specifications, | ||||||
|             @ApiParam(required = false, value = "开始日期") @RequestParam(required = false) String startDate, |             @ApiParam(required = false, value = "开始日期") @RequestParam(required = false) String startDate, | ||||||
|             @ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate, |             @ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate, | ||||||
|  |             @ApiParam(required = false, value = "营销区域id") @RequestParam(required = false) String areaId, | ||||||
|             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, |             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, | ||||||
|             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, |             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, | ||||||
|             HttpServletRequest request) { |             HttpServletRequest request) { | ||||||
|  | @ -60,7 +61,7 @@ public class StockReportApi extends BaseController { | ||||||
|         if (!redisService.exists(token)) { |         if (!redisService.exists(token)) { | ||||||
|             return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录"); |             return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录"); | ||||||
|         } |         } | ||||||
|         params = roleDateUtils.roleUtiles(token, "", "", ""); |         params = roleDateUtils.roleUtiles(token, areaId, "", ""); | ||||||
|         if ("0".equals(params.get("code"))) { |         if ("0".equals(params.get("code"))) { | ||||||
|             return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看"); |             return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -61,6 +61,7 @@ public class StockReportController extends BaseController { | ||||||
|             @ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String startTime, |             @ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String startTime, | ||||||
|             @ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String endTime, |             @ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String endTime, | ||||||
|             @ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate, |             @ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate, | ||||||
|  |             @ApiParam(required = false, value = "营销区域id") @RequestParam(required = false) String areaId, | ||||||
|             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, |             @ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum, | ||||||
|             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, |             @ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize, | ||||||
|             HttpServletRequest request) { |             HttpServletRequest request) { | ||||||
|  | @ -70,7 +71,7 @@ public class StockReportController extends BaseController { | ||||||
|         if (!redisService.isKey(token)) { |         if (!redisService.isKey(token)) { | ||||||
|             return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录"); |             return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录"); | ||||||
|         } |         } | ||||||
|         params = roleDateUtils.roleUtiles(token, "", "", ""); |         params = roleDateUtils.roleUtiles(token, areaId, "", ""); | ||||||
|         if ("0".equals(params.get("code"))) { |         if ("0".equals(params.get("code"))) { | ||||||
|             return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看"); |             return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -180,7 +180,7 @@ | ||||||
|                 ) |                 ) | ||||||
|             </if> |             </if> | ||||||
|         </where> |         </where> | ||||||
|         ORDER BY b.create_time DESC |         ORDER BY b.create_time DESC, b.id | ||||||
|     </select> |     </select> | ||||||
| 
 | 
 | ||||||
|     <select id="countUserByRole" parameterType="map"  resultType="Integer"> |     <select id="countUserByRole" parameterType="map"  resultType="Integer"> | ||||||
|  |  | ||||||
|  | @ -419,6 +419,7 @@ | ||||||
|         GROUP BY |         GROUP BY | ||||||
|         t1.sem_id ) mact |         t1.sem_id ) mact | ||||||
|         LEFT JOIN crm_marketing_area_info b ON mact.sem_id = b.id |         LEFT JOIN crm_marketing_area_info b ON mact.sem_id = b.id | ||||||
|  |         WHERE b.status = '1' | ||||||
|     </select> |     </select> | ||||||
| 
 | 
 | ||||||
|     <!-- 市场活动报表-按照业务员分组统计 --> |     <!-- 市场活动报表-按照业务员分组统计 --> | ||||||
|  |  | ||||||
|  | @ -10,10 +10,8 @@ import com.yb.lb.common.config.UserConfig; | ||||||
| import com.yb.lb.common.utils.*; | import com.yb.lb.common.utils.*; | ||||||
| import com.yb.lb.webapp.Invoice.entity.InvoiceDetail; | import com.yb.lb.webapp.Invoice.entity.InvoiceDetail; | ||||||
| import com.yb.lb.webapp.Invoice.entity.InvoiceInfo; | import com.yb.lb.webapp.Invoice.entity.InvoiceInfo; | ||||||
| import com.yb.lb.webapp.goodsinfo.goods.entity.GoodsInfo; |  | ||||||
| import com.yb.lb.webapp.random.service.RandomService; | import com.yb.lb.webapp.random.service.RandomService; | ||||||
| import com.yb.lb.webapp.redis.service.RedisService; | import com.yb.lb.webapp.redis.service.RedisService; | ||||||
| import com.yb.lb.webapp.u8.ueight.entity.CustomerInfo; |  | ||||||
| import com.yb.lb.webapp.u8.ueight.service.OrderUeightService; | import com.yb.lb.webapp.u8.ueight.service.OrderUeightService; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||||
|  | @ -22,7 +20,6 @@ import org.springframework.stereotype.Service; | ||||||
| 
 | 
 | ||||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.util.ArrayList; |  | ||||||
| import java.util.HashMap; | import java.util.HashMap; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  | @ -49,84 +46,6 @@ public class CrmInvoiceService { | ||||||
|     @Autowired |     @Autowired | ||||||
|     BaseSqlServer2Dao<InvoiceInfo> dao2; |     BaseSqlServer2Dao<InvoiceInfo> dao2; | ||||||
| 
 | 
 | ||||||
|     /** |  | ||||||
|      * 新增 |  | ||||||
|      * |  | ||||||
|      * @author lyb |  | ||||||
|      * @date 20210526 |  | ||||||
|      */ |  | ||||||
|     public boolean addInfo(Map<String, String> params, String id, String json) { |  | ||||||
|         String companyId = params.get("companyId") + ""; |  | ||||||
|         String invoiceNo = randomService.randomUtils2(FINALCMD.INVOICE_NO, DateUtil.getDays(), companyId); |  | ||||||
|         params.put("invoiceNo", invoiceNo); |  | ||||||
|         if (dao.counts(InvoiceInfo.class.getName() + ".findCode", params) > 0) { |  | ||||||
|             invoiceNo = randomService.randomUtils2(FINALCMD.INVOICE_NO, DateUtil.getDays(), companyId); |  | ||||||
|             params.put("invoiceNo", invoiceNo); |  | ||||||
|         } |  | ||||||
|         //添加主表 |  | ||||||
|         if (dao.add_obj(InvoiceInfo.class.getName() + id, params)) { |  | ||||||
|             List lists = new ArrayList(); |  | ||||||
|             List goodsList = new ArrayList(); |  | ||||||
|             List<Map<String, Object>> list = ListOrMapForJson.getlistForJson(json); |  | ||||||
|             for (Map map : list) { |  | ||||||
|                 map.put("invoiceId", params.get("id") + ""); |  | ||||||
|                 map.put("id", IdUtil.simpleUUID()); |  | ||||||
|                 map.put("createTime", DateUtil.getTime()); |  | ||||||
|                 lists.add(map); |  | ||||||
|                 // 引用 |  | ||||||
|                 Map tMap = new HashMap(); |  | ||||||
|                 tMap.put("id", IdUtil.simpleUUID()); |  | ||||||
|                 tMap.put("archivesId", params.get("id") + ""); |  | ||||||
|                 tMap.put("quoteId", map.get("goodsId") + ""); |  | ||||||
|                 goodsList.add(tMap); |  | ||||||
|             } |  | ||||||
|             if (dao.add_obj(InvoiceDetail.class.getName() + ".addCrmInvoiceDetails", lists)) { |  | ||||||
|                 // 添加对商品的引用 |  | ||||||
|                 dao.add_obj(GoodsInfo.class.getName() + ".addQuotes", goodsList); |  | ||||||
|                 return true; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return false; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 发货单修改 |  | ||||||
|      * |  | ||||||
|      * @author lyb |  | ||||||
|      * @date 20210526 |  | ||||||
|      */ |  | ||||||
|     public boolean updateInfo(Map<String, String> params, String id, String json) { |  | ||||||
|         if (dao.update(InvoiceInfo.class.getName() + id, params)) { |  | ||||||
|             Map<String, Object> info = new HashMap<>(); |  | ||||||
|             String invoiceId = params.get("id") + ""; |  | ||||||
|             info.put("invoiceId", invoiceId); |  | ||||||
|             dao.delete(InvoiceDetail.class.getName() + ".deleteCrmInvoiceDetailById", info); |  | ||||||
|             List lists = new ArrayList(); |  | ||||||
|             List goodsList = new ArrayList(); |  | ||||||
|             List<Map<String, Object>> list = ListOrMapForJson.getlistForJson(json); |  | ||||||
|             for (Map map : list) { |  | ||||||
|                 map.put("invoiceId", invoiceId); |  | ||||||
|                 map.put("id", IdUtil.simpleUUID()); |  | ||||||
|                 map.put("createTime", DateUtil.getTime()); |  | ||||||
|                 lists.add(map); |  | ||||||
|                 // 引用 |  | ||||||
|                 Map tMap = new HashMap(); |  | ||||||
|                 tMap.put("id", IdUtil.simpleUUID()); |  | ||||||
|                 tMap.put("archivesId", invoiceId); |  | ||||||
|                 tMap.put("quoteId", map.get("goodsId") + ""); |  | ||||||
|                 goodsList.add(tMap); |  | ||||||
|             } |  | ||||||
|             if (dao.add_obj(InvoiceDetail.class.getName() + ".addCrmInvoiceDetails", lists)) { |  | ||||||
|                 // 删除商品的引用 |  | ||||||
|                 dao.delete(GoodsInfo.class.getName() + ".deleteQuoteById", invoiceId); |  | ||||||
|                 // 添加对商品的引用 |  | ||||||
|                 dao.add_obj(GoodsInfo.class.getName() + ".addQuotes", goodsList); |  | ||||||
|                 return true; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return false; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |     /** | ||||||
|      * 通用修改 |      * 通用修改 | ||||||
|      * |      * | ||||||
|  |  | ||||||
|  | @ -175,7 +175,7 @@ public class ApplyClientInfoService { | ||||||
|                     // 建档人id |                     // 建档人id | ||||||
|                     applyContact.setCreateUserId(applyClientInfo.getCreateUserId()); |                     applyContact.setCreateUserId(applyClientInfo.getCreateUserId()); | ||||||
|                     // 建档人名称 |                     // 建档人名称 | ||||||
|                     applyContact.setCreateUser(params.get("id") + ""); |                     applyContact.setCreateUser(params.get("realName") + ""); | ||||||
|                     // 建档时间 |                     // 建档时间 | ||||||
|                     applyContact.setCreateTime(DateUtil.getTime()); |                     applyContact.setCreateTime(DateUtil.getTime()); | ||||||
|                     // 公司组织id |                     // 公司组织id | ||||||
|  |  | ||||||
|  | @ -427,6 +427,7 @@ public class DistributorInfo implements Serializable { | ||||||
|     /** |     /** | ||||||
|      * 0待认证1已认证 |      * 0待认证1已认证 | ||||||
|      */ |      */ | ||||||
|  |     @Excel(name = "认证状态", width = 15, orderNum = "15", replace = {"待认证_0", "已认证_1"}) | ||||||
|     private String isVerify; |     private String isVerify; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  |  | ||||||
|  | @ -97,6 +97,8 @@ public class OrderCronService { | ||||||
|                             goodsMap1.put("createTime", createTime); |                             goodsMap1.put("createTime", createTime); | ||||||
|                         } |                         } | ||||||
|                         if (orderUeightService.addOrderDetail(goodsList1)) { |                         if (orderUeightService.addOrderDetail(goodsList1)) { | ||||||
|  |                             // 因为U8的id是存到100和4002个数据库中的,可能会重复,因此视图中加了字符便于区分,所以这里需要获取U8的原始id回写U8 | ||||||
|  |                             info.put("id", getBeforeDash(orderId)); | ||||||
|                             // 回写U8销售出库单的状态 |                             // 回写U8销售出库单的状态 | ||||||
|                             if (FINALCMD.KESAI.equals(companyId)) { |                             if (FINALCMD.KESAI.equals(companyId)) { | ||||||
|                                 orderUeightService.update(".updateOrderInfo", info); |                                 orderUeightService.update(".updateOrderInfo", info); | ||||||
|  | @ -137,4 +139,11 @@ public class OrderCronService { | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public String getBeforeDash(String input) { | ||||||
|  |         if (input == null || !input.contains("-")) { | ||||||
|  |             return input; | ||||||
|  |         } | ||||||
|  |         return input.split("-")[0]; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue